diff --git a/.gradle/4.4/fileChanges/last-build.bin b/.gradle/4.4/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/.gradle/4.4/fileChanges/last-build.bin differ diff --git a/.gradle/4.4/fileContent/fileContent.lock b/.gradle/4.4/fileContent/fileContent.lock new file mode 100644 index 0000000..8944348 Binary files /dev/null and b/.gradle/4.4/fileContent/fileContent.lock differ diff --git a/.gradle/4.4/fileHashes/fileHashes.bin b/.gradle/4.4/fileHashes/fileHashes.bin new file mode 100644 index 0000000..4cc4e65 Binary files /dev/null and b/.gradle/4.4/fileHashes/fileHashes.bin differ diff --git a/.gradle/4.4/fileHashes/fileHashes.lock b/.gradle/4.4/fileHashes/fileHashes.lock new file mode 100644 index 0000000..f70a464 Binary files /dev/null and b/.gradle/4.4/fileHashes/fileHashes.lock differ diff --git a/.gradle/4.4/fileHashes/resourceHashesCache.bin b/.gradle/4.4/fileHashes/resourceHashesCache.bin new file mode 100644 index 0000000..e5e47c6 Binary files /dev/null and b/.gradle/4.4/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/4.4/javaCompile/classAnalysis.bin b/.gradle/4.4/javaCompile/classAnalysis.bin new file mode 100644 index 0000000..b2abca2 Binary files /dev/null and b/.gradle/4.4/javaCompile/classAnalysis.bin differ diff --git a/.gradle/4.4/javaCompile/jarAnalysis.bin b/.gradle/4.4/javaCompile/jarAnalysis.bin new file mode 100644 index 0000000..da0437d Binary files /dev/null and b/.gradle/4.4/javaCompile/jarAnalysis.bin differ diff --git a/.gradle/4.4/javaCompile/javaCompile.lock b/.gradle/4.4/javaCompile/javaCompile.lock new file mode 100644 index 0000000..e215f5d Binary files /dev/null and b/.gradle/4.4/javaCompile/javaCompile.lock differ diff --git a/.gradle/4.4/javaCompile/taskHistory.bin b/.gradle/4.4/javaCompile/taskHistory.bin new file mode 100644 index 0000000..a6de9aa Binary files /dev/null and b/.gradle/4.4/javaCompile/taskHistory.bin differ diff --git a/.gradle/4.4/javaCompile/taskJars.bin b/.gradle/4.4/javaCompile/taskJars.bin new file mode 100644 index 0000000..b1ab836 Binary files /dev/null and b/.gradle/4.4/javaCompile/taskJars.bin differ diff --git a/.gradle/4.4/taskHistory/taskHistory.bin b/.gradle/4.4/taskHistory/taskHistory.bin new file mode 100644 index 0000000..e77c732 Binary files /dev/null and b/.gradle/4.4/taskHistory/taskHistory.bin differ diff --git a/.gradle/4.4/taskHistory/taskHistory.lock b/.gradle/4.4/taskHistory/taskHistory.lock new file mode 100644 index 0000000..06bdb93 Binary files /dev/null and b/.gradle/4.4/taskHistory/taskHistory.lock differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..7dbc19d Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..1a40d1b --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Thu Mar 29 22:54:43 PKT 2018 +gradle.version=4.4 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..4ef7057 Binary files /dev/null and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser new file mode 100644 index 0000000..167c54a Binary files /dev/null and b/.idea/caches/build_file_checksums.ser differ diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..30aa626 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..7ac24c7 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__android_arch_core_common_1_1_0_jar.xml b/.idea/libraries/Gradle__android_arch_core_common_1_1_0_jar.xml new file mode 100644 index 0000000..9869803 --- /dev/null +++ b/.idea/libraries/Gradle__android_arch_core_common_1_1_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__android_arch_core_runtime_1_1_0.xml b/.idea/libraries/Gradle__android_arch_core_runtime_1_1_0.xml new file mode 100644 index 0000000..1d43082 --- /dev/null +++ b/.idea/libraries/Gradle__android_arch_core_runtime_1_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_0_jar.xml b/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_0_jar.xml new file mode 100644 index 0000000..29c0049 --- /dev/null +++ b/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_0.xml b/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_0.xml new file mode 100644 index 0000000..7e126ab --- /dev/null +++ b/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_0.xml b/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_0.xml new file mode 100644 index 0000000..1c4ff37 --- /dev/null +++ b/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_0.xml b/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_0.xml new file mode 100644 index 0000000..58e0671 --- /dev/null +++ b/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_27_1_0.xml b/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_27_1_0.xml new file mode 100644 index 0000000..1314075 --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_27_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_appcompat_v7_27_1_0.xml b/.idea/libraries/Gradle__com_android_support_appcompat_v7_27_1_0.xml new file mode 100644 index 0000000..7640427 --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_appcompat_v7_27_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_1_0_2.xml b/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_1_0_2.xml new file mode 100644 index 0000000..02b974e --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_1_0_2.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_solver_1_0_2_jar.xml b/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_solver_1_0_2_jar.xml new file mode 100644 index 0000000..a3ba763 --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_solver_1_0_2_jar.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_recyclerview_v7_27_1_0.xml b/.idea/libraries/Gradle__com_android_support_recyclerview_v7_27_1_0.xml new file mode 100644 index 0000000..d3719c0 --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_recyclerview_v7_27_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_support_annotations_27_1_0_jar.xml b/.idea/libraries/Gradle__com_android_support_support_annotations_27_1_0_jar.xml new file mode 100644 index 0000000..0553925 --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_support_annotations_27_1_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_support_compat_27_1_0.xml b/.idea/libraries/Gradle__com_android_support_support_compat_27_1_0.xml new file mode 100644 index 0000000..22a884d --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_support_compat_27_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_support_core_ui_27_1_0.xml b/.idea/libraries/Gradle__com_android_support_support_core_ui_27_1_0.xml new file mode 100644 index 0000000..92d3602 --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_support_core_ui_27_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_support_core_utils_27_1_0.xml b/.idea/libraries/Gradle__com_android_support_support_core_utils_27_1_0.xml new file mode 100644 index 0000000..259bd74 --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_support_core_utils_27_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_support_fragment_27_1_0.xml b/.idea/libraries/Gradle__com_android_support_support_fragment_27_1_0.xml new file mode 100644 index 0000000..2ddb1c9 --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_support_fragment_27_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_support_media_compat_26_1_0.xml b/.idea/libraries/Gradle__com_android_support_support_media_compat_26_1_0.xml new file mode 100644 index 0000000..8b8818c --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_support_media_compat_26_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_support_v4_26_1_0.xml b/.idea/libraries/Gradle__com_android_support_support_v4_26_1_0.xml new file mode 100644 index 0000000..900754b --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_support_v4_26_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_support_vector_drawable_27_1_0.xml b/.idea/libraries/Gradle__com_android_support_support_vector_drawable_27_1_0.xml new file mode 100644 index 0000000..a099308 --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_support_vector_drawable_27_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_3_0_1.xml b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_3_0_1.xml new file mode 100644 index 0000000..e4305f4 --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_3_0_1.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_3_0_1.xml b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_3_0_1.xml new file mode 100644 index 0000000..1230091 --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_3_0_1.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_test_rules_1_0_1.xml b/.idea/libraries/Gradle__com_android_support_test_rules_1_0_1.xml new file mode 100644 index 0000000..f11a577 --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_test_rules_1_0_1.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_android_support_test_runner_1_0_1.xml b/.idea/libraries/Gradle__com_android_support_test_runner_1_0_1.xml new file mode 100644 index 0000000..146ad3e --- /dev/null +++ b/.idea/libraries/Gradle__com_android_support_test_runner_1_0_1.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_android_gms_play_services_appinvite_12_0_1.xml b/.idea/libraries/Gradle__com_google_android_gms_play_services_appinvite_12_0_1.xml new file mode 100644 index 0000000..2b58bdd --- /dev/null +++ b/.idea/libraries/Gradle__com_google_android_gms_play_services_appinvite_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_android_gms_play_services_appinvite_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_android_gms_play_services_appinvite_license_12_0_1.xml new file mode 100644 index 0000000..1c7495d --- /dev/null +++ b/.idea/libraries/Gradle__com_google_android_gms_play_services_appinvite_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_android_gms_play_services_base_12_0_1.xml b/.idea/libraries/Gradle__com_google_android_gms_play_services_base_12_0_1.xml new file mode 100644 index 0000000..d132556 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_android_gms_play_services_base_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_android_gms_play_services_base_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_android_gms_play_services_base_license_12_0_1.xml new file mode 100644 index 0000000..7beb206 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_android_gms_play_services_base_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_android_gms_play_services_basement_12_0_1.xml b/.idea/libraries/Gradle__com_google_android_gms_play_services_basement_12_0_1.xml new file mode 100644 index 0000000..cd8defb --- /dev/null +++ b/.idea/libraries/Gradle__com_google_android_gms_play_services_basement_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_android_gms_play_services_basement_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_android_gms_play_services_basement_license_12_0_1.xml new file mode 100644 index 0000000..201155a --- /dev/null +++ b/.idea/libraries/Gradle__com_google_android_gms_play_services_basement_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_android_gms_play_services_tasks_12_0_1.xml b/.idea/libraries/Gradle__com_google_android_gms_play_services_tasks_12_0_1.xml new file mode 100644 index 0000000..5b2e124 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_android_gms_play_services_tasks_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_android_gms_play_services_tasks_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_android_gms_play_services_tasks_license_12_0_1.xml new file mode 100644 index 0000000..a7fb4a2 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_android_gms_play_services_tasks_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml b/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml new file mode 100644 index 0000000..947e251 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_12_0_1.xml new file mode 100644 index 0000000..bcfb5cb --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_impl_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_impl_12_0_1.xml new file mode 100644 index 0000000..44e1e06 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_impl_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_impl_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_impl_license_12_0_1.xml new file mode 100644 index 0000000..790aa58 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_impl_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_license_12_0_1.xml new file mode 100644 index 0000000..2fd6c86 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_auth_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_auth_12_0_1.xml new file mode 100644 index 0000000..2c20120 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_auth_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_auth_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_auth_license_12_0_1.xml new file mode 100644 index 0000000..c40f452 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_auth_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_common_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_common_12_0_1.xml new file mode 100644 index 0000000..605ee1b --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_common_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_common_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_common_license_12_0_1.xml new file mode 100644 index 0000000..42f3b66 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_common_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_core_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_core_12_0_1.xml new file mode 100644 index 0000000..d265398 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_core_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_database_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_database_12_0_1.xml new file mode 100644 index 0000000..9e0a508 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_database_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_database_connection_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_database_connection_12_0_1.xml new file mode 100644 index 0000000..ffbfdc3 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_database_connection_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_database_connection_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_database_connection_license_12_0_1.xml new file mode 100644 index 0000000..62b36c5 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_database_connection_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_database_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_database_license_12_0_1.xml new file mode 100644 index 0000000..7fd5f13 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_database_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_dynamic_links_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_dynamic_links_12_0_1.xml new file mode 100644 index 0000000..a81371b --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_dynamic_links_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_dynamic_links_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_dynamic_links_license_12_0_1.xml new file mode 100644 index 0000000..4fece38 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_dynamic_links_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_iid_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_iid_12_0_1.xml new file mode 100644 index 0000000..ac59a46 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_iid_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_iid_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_iid_license_12_0_1.xml new file mode 100644 index 0000000..7ad60a2 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_iid_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_invites_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_invites_12_0_1.xml new file mode 100644 index 0000000..0fb92fb --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_invites_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_storage_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_storage_12_0_1.xml new file mode 100644 index 0000000..5f8cfb1 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_storage_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_storage_common_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_storage_common_12_0_1.xml new file mode 100644 index 0000000..0e7f935 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_storage_common_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_storage_common_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_storage_common_license_12_0_1.xml new file mode 100644 index 0000000..527ee82 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_storage_common_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_firebase_firebase_storage_license_12_0_1.xml b/.idea/libraries/Gradle__com_google_firebase_firebase_storage_license_12_0_1.xml new file mode 100644 index 0000000..f4f832f --- /dev/null +++ b/.idea/libraries/Gradle__com_google_firebase_firebase_storage_license_12_0_1.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml b/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml new file mode 100644 index 0000000..5c4dd4e --- /dev/null +++ b/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__de_hdodenhof_circleimageview_2_2_0.xml b/.idea/libraries/Gradle__de_hdodenhof_circleimageview_2_2_0.xml new file mode 100644 index 0000000..76e82e4 --- /dev/null +++ b/.idea/libraries/Gradle__de_hdodenhof_circleimageview_2_2_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml b/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml new file mode 100644 index 0000000..f9c9a30 --- /dev/null +++ b/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__junit_junit_4_12_jar.xml b/.idea/libraries/Gradle__junit_junit_4_12_jar.xml new file mode 100644 index 0000000..f4f25a8 --- /dev/null +++ b/.idea/libraries/Gradle__junit_junit_4_12_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml b/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml new file mode 100644 index 0000000..5855a29 --- /dev/null +++ b/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml b/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml new file mode 100644 index 0000000..50cf2b9 --- /dev/null +++ b/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml b/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml new file mode 100644 index 0000000..a5eaca5 --- /dev/null +++ b/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml b/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml new file mode 100644 index 0000000..b4dabdc --- /dev/null +++ b/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_annotations_java5_15_0_jar.xml b/.idea/libraries/Gradle__org_jetbrains_annotations_java5_15_0_jar.xml new file mode 100644 index 0000000..befa813 --- /dev/null +++ b/.idea/libraries/Gradle__org_jetbrains_annotations_java5_15_0_jar.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..c0f68ed --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..3846ea3 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Wanderlust.iml b/Wanderlust.iml new file mode 100644 index 0000000..56d8785 --- /dev/null +++ b/Wanderlust.iml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/app/app.iml b/app/app.iml new file mode 100644 index 0000000..60d9966 --- /dev/null +++ b/app/app.iml @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..25a9323 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,37 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 27 + defaultConfig { + applicationId "com.project.wanderlust" + minSdkVersion 16 + targetSdkVersion 27 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + implementation fileTree(include: ['*.jar'], dir: 'libs') + implementation 'com.android.support:appcompat-v7:27.1.0' + implementation 'com.google.firebase:firebase-database:12.0.1' + implementation 'com.google.firebase:firebase-storage:12.0.1' + implementation 'com.google.firebase:firebase-auth:12.0.1' + implementation 'de.hdodenhof:circleimageview:2.2.0' + implementation 'com.google.firebase:firebase-invites:12.0.1' + implementation 'com.android.support.constraint:constraint-layout:1.0.2' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'com.android.support.test:runner:1.0.1' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' + implementation 'org.jetbrains:annotations-java5:15.0' + implementation 'com.android.support:recyclerview-v7:27.1.0' +} + +apply plugin: 'com.google.gms.google-services' diff --git a/app/google-services.json b/app/google-services.json new file mode 100644 index 0000000..3c3639a --- /dev/null +++ b/app/google-services.json @@ -0,0 +1,55 @@ +{ + "project_info": { + "project_number": "788286829576", + "firebase_url": "https://wanderlust-13c8f.firebaseio.com", + "project_id": "wanderlust-13c8f", + "storage_bucket": "wanderlust-13c8f.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:788286829576:android:fe1e623b15e44bea", + "android_client_info": { + "package_name": "com.project.wanderlust" + } + }, + "oauth_client": [ + { + "client_id": "788286829576-tinbpukscr6k5mr6rn9u2h3eo7p2fg0t.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.project.wanderlust", + "certificate_hash": "c2bfc2165ad3a0f9b0e9b1e6b590994ed7f67ff2" + } + }, + { + "client_id": "788286829576-ksh3jgsplcaakp61f160ln4dv287cpcd.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyA19ObPIbVU2_NpNoFt0V-LuWYe0JB6jao" + } + ], + "services": { + "analytics_service": { + "status": 1 + }, + "appinvite_service": { + "status": 2, + "other_platform_oauth_client": [ + { + "client_id": "788286829576-ksh3jgsplcaakp61f160ln4dv287cpcd.apps.googleusercontent.com", + "client_type": 3 + } + ] + }, + "ads_service": { + "status": 2 + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/app/src/androidTest/java/com/project/wanderlust/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/project/wanderlust/ExampleInstrumentedTest.java new file mode 100644 index 0000000..b42ffa9 --- /dev/null +++ b/app/src/androidTest/java/com/project/wanderlust/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.project.wanderlust; + +import android.content.Context; +import android.support.test.InstrumentationRegistry; +import android.support.test.runner.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getTargetContext(); + + assertEquals("com.project.wanderlust", appContext.getPackageName()); + } +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..b031808 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/project/wanderlust/ContactAdapter.java b/app/src/main/java/com/project/wanderlust/ContactAdapter.java new file mode 100644 index 0000000..bac8b00 --- /dev/null +++ b/app/src/main/java/com/project/wanderlust/ContactAdapter.java @@ -0,0 +1,70 @@ +package com.project.wanderlust; + +import android.support.annotation.NonNull; +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.LinearLayout; +import android.widget.TextView; + +import java.util.ArrayList; + +import de.hdodenhof.circleimageview.CircleImageView; + +public class ContactAdapter extends RecyclerView.Adapter { + private ArrayList items; + private int itemLayout; + + public ContactAdapter(ArrayList items, int itemLayout) { + this.items = items; + this.itemLayout = itemLayout; + } + + @NonNull + @Override + public ContactViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + View v = LayoutInflater.from(parent.getContext()).inflate(itemLayout, parent, false); + return new ContactViewHolder(v); + } + + @Override + public void onBindViewHolder(@NonNull ContactViewHolder holder, int position) { + if(items != null) { + ContactCell cell = items.get(position); + + if(cell.getPhoto() == null) { + holder.photoImageView.setImageResource(R.drawable.account); + } else { + holder.photoImageView.setImageBitmap(cell.getPhoto()); + } + holder.nameTextView.setText(cell.getName()); + holder.statusTextView.setText(cell.getStatus()); + } + } + + @Override + public int getItemCount() + { + int i = 0; + if(items != null) + return items.size(); + else + return 0; + } + + public class ContactViewHolder extends RecyclerView.ViewHolder { + public CircleImageView photoImageView; + public LinearLayout layout; + public TextView nameTextView; + public TextView statusTextView; + public ContactViewHolder(View view) { + super(view); + + photoImageView = view.findViewById(R.id.photo); + layout = view.findViewById(R.id.layout); + nameTextView = view.findViewById(R.id.person); + statusTextView = view.findViewById(R.id.status); + } + } +} diff --git a/app/src/main/java/com/project/wanderlust/ContactCell.java b/app/src/main/java/com/project/wanderlust/ContactCell.java new file mode 100644 index 0000000..44e44bf --- /dev/null +++ b/app/src/main/java/com/project/wanderlust/ContactCell.java @@ -0,0 +1,33 @@ +package com.project.wanderlust; + +import android.graphics.Bitmap; + +public class ContactCell { + private Bitmap photo; + private String name; + private String status; + private String phone; + + public ContactCell(Bitmap photo, String name, String status, String phone) { + this.photo = photo; + this.name = name; + this.status = status; + this.phone = phone; + } + + public Bitmap getPhoto() { return photo; } + + public String getName() { return name; } + + public String getStatus() { return status; } + + public String getPhone() { return phone; } + + public void setPhoto(Bitmap photo) { this.photo = photo; } + + public void setName(String name) { this.name = name; } + + public void setStatus(String status) { this.status = status; } + + public void setPhone(String phone) { this.phone = phone; } +} diff --git a/app/src/main/java/com/project/wanderlust/Contacts.java b/app/src/main/java/com/project/wanderlust/Contacts.java new file mode 100644 index 0000000..9947880 --- /dev/null +++ b/app/src/main/java/com/project/wanderlust/Contacts.java @@ -0,0 +1,87 @@ +package com.project.wanderlust; + +import android.content.ContentResolver; +import android.content.Context; +import android.database.Cursor; +import android.provider.ContactsContract; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.support.v7.widget.DefaultItemAnimator; +import android.support.v7.widget.LinearLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.view.GestureDetector; +import android.view.MotionEvent; + +import java.util.ArrayList; + +public class Contacts extends AppCompatActivity implements RecyclerView.OnItemTouchListener{ + + public static ArrayList names = new ArrayList<>(); + public static ArrayList phones = new ArrayList<>(); + + GestureDetector gestureDetector; + Context c; + RecyclerView rv; + ArrayList arrayList; + ContactAdapter adapter; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_contacts); + + c = this; + rv = findViewById(R.id.contactRecyclerView); + + gestureDetector = new GestureDetector(this, new GestureDetector.SimpleOnGestureListener() + { + @Override + public boolean onSingleTapUp(MotionEvent e) { + return super.onSingleTapUp(e); + } + }); + + loadContactsFromPhone(); + + arrayList = new ArrayList<>(); + for(int i = 0; i < names.size(); i++) { + arrayList.add(new ContactCell(null, names.get(i), phones.get(i), "vfvd")); + } + + adapter = new ContactAdapter(arrayList, R.layout.contact_cell); + rv.setLayoutManager(new LinearLayoutManager(this)); + rv.addOnItemTouchListener(this); + rv.setItemAnimator(new DefaultItemAnimator()); + rv.setAdapter(adapter); + } + + private void loadContactsFromPhone() { + ContentResolver cr = getContentResolver(); + Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null); + while (cursor.moveToNext()) { + String contactId = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID)); + + // Get all phone numbers. + Cursor phones = cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = " + contactId, null, null); + + while (phones.moveToNext()) { + String number = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)).replaceAll("\\s+",""); + String name = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME)); + if(!Contacts.phones.contains(number)) { + Contacts.names.add(name); + Contacts.phones.add(number); + } + } + phones.close(); + } + cursor.close(); + } + + @Override + public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) { + return false; + } + + @Override public void onTouchEvent(RecyclerView rv, MotionEvent e) { } + @Override public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) { } +} diff --git a/app/src/main/java/com/project/wanderlust/Extra.java b/app/src/main/java/com/project/wanderlust/Extra.java new file mode 100644 index 0000000..e48c345 --- /dev/null +++ b/app/src/main/java/com/project/wanderlust/Extra.java @@ -0,0 +1,46 @@ +package com.project.wanderlust; + +import android.content.Intent; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.View; + +import com.google.android.gms.appinvite.AppInviteInvitation; +import com.google.firebase.database.DataSnapshot; +import com.google.firebase.database.DatabaseError; +import com.google.firebase.database.FirebaseDatabase; +import com.google.firebase.database.ValueEventListener; + +public class Extra extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_extra); + } + + public void invite(View view) { + //requesting for invite link + FirebaseDatabase.getInstance().getReference("inviteLink").addValueEventListener(new ValueEventListener() { + @Override + public void onDataChange(DataSnapshot dataSnapshot) { + + String link = ""; + try { + //reading invite link + link = dataSnapshot.getValue(String.class); + } catch (Exception ex) {} + + //making invite request + Intent intent = new AppInviteInvitation.IntentBuilder("Hey check this app") + .setMessage("Hey that's a new messaging app. " + link) + .setCallToActionText("Share") + .build(); + startActivityForResult(intent, 2); + } + + @Override + public void onCancelled(DatabaseError databaseError){} + }); + } +} diff --git a/app/src/main/java/com/project/wanderlust/RegisterPhoneNumber.java b/app/src/main/java/com/project/wanderlust/RegisterPhoneNumber.java new file mode 100644 index 0000000..7ecb126 --- /dev/null +++ b/app/src/main/java/com/project/wanderlust/RegisterPhoneNumber.java @@ -0,0 +1,130 @@ +package com.project.wanderlust; + +import android.Manifest; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.support.annotation.NonNull; +import android.support.v4.app.ActivityCompat; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.View; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.EditText; +import android.widget.Spinner; +import android.widget.TextView; + +import com.google.firebase.auth.FirebaseAuth; +import com.google.firebase.database.FirebaseDatabase; + +import java.util.ArrayList; +import java.util.Locale; + +public class RegisterPhoneNumber extends AppCompatActivity { + + private String[] locales; + FirebaseAuth mAuth; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_register_phone_number); + + //making firebase persistent + try { + FirebaseDatabase.getInstance().setPersistenceEnabled(true); + FirebaseDatabase.getInstance().getReference("users").keepSynced(true); + FirebaseDatabase.getInstance().getReference("inviteLink").keepSynced(true); + } + catch (Exception ex) {} + + //FirebaseDatabase.getInstance().getReference("inviteLink").setValue("abc"); + + //asking for permissions + String[] permissions = {Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.READ_CONTACTS, Manifest.permission.ACCESS_FINE_LOCATION}; + if(!SharedFunctions.hasPermissions(getApplicationContext(), permissions)) { + ActivityCompat.requestPermissions(this, permissions, 1); + } + else doAfterPermissions(); + } + + @Override + public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { + switch (requestCode) { + case 1: + if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) doAfterPermissions(); + else finish(); + } + } + + private void doAfterPermissions() { + //checking if user already signed in + mAuth = FirebaseAuth.getInstance(); + if(mAuth.getCurrentUser() != null) { + startActivity(new Intent(this, Contacts.class)); + finish(); + } + + createCountryDropDownMenu(); + } + + private void createCountryDropDownMenu() { + ArrayList countries= getCountryNames(); + ArrayAdapter adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, countries); + + Spinner countrySpinner = findViewById(R.id.country); + countrySpinner.setAdapter(adapter); + + //setting country to current country + String currentCountry = "Pakistan"; + for(int i = 0; i < countries.size(); i++) { + if(countries.get(i).equals(currentCountry)) { + countrySpinner.setSelection(i); + break; + } + } + + countrySpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + @Override + public void onItemSelected(AdapterView parent, View view, int position, long id) { + String CountryID= locales[position]; + String[] rl = getResources().getStringArray(R.array.CountryCodes); + for(String x : rl){ + String[] g = x.split(","); + if(g[1].trim().equals(CountryID.trim())){ + TextView textView = findViewById(R.id.countryCode); + textView.setText("+" + g[0]); + return; + } + } + } + + @Override + public void onNothingSelected(AdapterView parent) { + + } + }); + } + + public void nextButton(View view) { + TextView editText1 = findViewById(R.id.countryCode); + EditText editText2 = findViewById(R.id.phone); + + Intent intent = new Intent(this, VerifyPhoneNumberActivity.class); + intent.putExtra("phone", editText1.getText().toString() + editText2.getText().toString()); + startActivity(intent); + } + + public ArrayList getCountryNames() { + //Getting country ISOs + locales = Locale.getISOCountries(); + ArrayList countries = new ArrayList<>(); + + //getting country names + for (String countryCode : locales) { + Locale obj = new Locale("", countryCode); + countries.add(obj.getDisplayCountry()); + } + return countries; + } +} diff --git a/app/src/main/java/com/project/wanderlust/SetProfileData.java b/app/src/main/java/com/project/wanderlust/SetProfileData.java new file mode 100644 index 0000000..1bc3ddd --- /dev/null +++ b/app/src/main/java/com/project/wanderlust/SetProfileData.java @@ -0,0 +1,136 @@ +package com.project.wanderlust; + +import android.app.ProgressDialog; +import android.content.ContextWrapper; +import android.content.Intent; +import android.graphics.Bitmap; +import android.graphics.drawable.BitmapDrawable; +import android.net.Uri; +import android.support.annotation.NonNull; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.View; +import android.widget.EditText; +import android.widget.Toast; + +import com.google.android.gms.tasks.OnFailureListener; +import com.google.android.gms.tasks.OnSuccessListener; +import com.google.firebase.auth.FirebaseAuth; +import com.google.firebase.database.DatabaseReference; +import com.google.firebase.database.FirebaseDatabase; +import com.google.firebase.storage.FirebaseStorage; +import com.google.firebase.storage.StorageReference; +import com.google.firebase.storage.UploadTask; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.OutputStream; +import java.util.HashMap; +import java.util.Map; + +import de.hdodenhof.circleimageview.CircleImageView; + +public class SetProfileData extends AppCompatActivity { + private EditText name; + private CircleImageView imageView; + private DatabaseReference mDatabase; + String phone; + private StorageReference storageRef; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_set_profile_data); + mDatabase = FirebaseDatabase.getInstance().getReference(); + storageRef = FirebaseStorage.getInstance().getReference(); + Intent intent = getIntent(); + phone = (String) intent.getSerializableExtra("phone"); + name = findViewById(R.id.name); + imageView = findViewById(R.id.photo); + imageView.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent gallery = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI); + startActivityForResult(gallery, 1); + } + }); + } + + public void nextButton(View view) { + BitmapDrawable drawable = (BitmapDrawable) imageView.getDrawable(); + if(drawable == null) { + Toast.makeText(this, "Must attach a Profile Photo", Toast.LENGTH_SHORT).show(); + return; + } + final Bitmap photo = drawable.getBitmap(); + final String nam = name.getText().toString(); + if(nam.length() == 0) { + Toast.makeText(this, "Must input Name", Toast.LENGTH_SHORT).show(); + return; + } + + StorageReference reference = storageRef.child("profilePictures/" + phone + ".jpg"); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + photo.compress(Bitmap.CompressFormat.JPEG, 100, baos); + byte[] data = baos.toByteArray(); + + final ProgressDialog dialog = ProgressDialog.show(this, "Please wait", "Uploading Image...", true); + UploadTask uploadTask = reference.putBytes(data); + uploadTask.addOnFailureListener(new OnFailureListener() { + @Override + public void onFailure(@NonNull Exception exception) { + Toast.makeText(SetProfileData.this, exception.getMessage(), Toast.LENGTH_SHORT).show(); + } + }).addOnSuccessListener(new OnSuccessListener() { + @Override + public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) { + ContextWrapper wrapper = new ContextWrapper(getApplicationContext()); + File file = wrapper.getDir("profilePictures",MODE_PRIVATE); + file = new File(file, FirebaseAuth.getInstance().getCurrentUser().getPhoneNumber() + ".jpg"); + OutputStream stream = null; + try { + stream = new FileOutputStream(file); + photo.compress(Bitmap.CompressFormat.JPEG,100,stream); + } + catch (Exception ex) { + Toast.makeText(SetProfileData.this, ex.getMessage(), Toast.LENGTH_SHORT).show(); + } + finally { + try { + dialog.dismiss(); + stream.flush(); + stream.close(); + }catch (Exception ex) {} + } + Map map = new HashMap<>(); + map.put("name", nam); + map.put("status", "Available"); + DatabaseReference reference1 = mDatabase.child("users").child(phone); + + reference1.child("name").setValue(null); + reference1.child("status").setValue(null); + mDatabase.child("users").child(phone).setValue(map); + startActivity(new Intent(SetProfileData.this, Contacts.class)); + finish(); + } + }); + } + catch (Exception ex) { + Toast.makeText(SetProfileData.this, ex.getMessage(), Toast.LENGTH_SHORT).show(); + } + } + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + + if(resultCode == RESULT_OK) { + if(requestCode == 1) { + Uri imageUri = data.getData(); + imageView.setImageURI(imageUri); + } + } + } +} diff --git a/app/src/main/java/com/project/wanderlust/SharedFunctions.java b/app/src/main/java/com/project/wanderlust/SharedFunctions.java new file mode 100644 index 0000000..830e488 --- /dev/null +++ b/app/src/main/java/com/project/wanderlust/SharedFunctions.java @@ -0,0 +1,63 @@ +package com.project.wanderlust; + +import android.content.Context; +import android.content.pm.PackageManager; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.support.annotation.Nullable; +import android.support.v4.app.ActivityCompat; + +import org.jetbrains.annotations.Contract; + +import java.io.File; + +public class SharedFunctions { + @Contract(pure = true) + public static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) { + final int height = options.outHeight; + final int width = options.outWidth; + int inSampleSize = 1; + + if (height > reqHeight || width > reqWidth) { + final int halfHeight = height / 2; + final int halfWidth = width / 2; + + while ((halfHeight / inSampleSize) >= reqHeight + && (halfWidth / inSampleSize) >= reqWidth) { + inSampleSize *= 2; + } + } + return inSampleSize; + } + + @Nullable + public static Bitmap decodeBitmapFromFile(File file, int reqWidth, int reqHeight) { + final BitmapFactory.Options options = new BitmapFactory.Options(); + options.inJustDecodeBounds = true; + try { + BitmapFactory.decodeFile(file.getAbsolutePath(), options); + + // Calculate inSampleSize + options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight); + + // Decode bitmap with inSampleSize set + options.inJustDecodeBounds = false; + return BitmapFactory.decodeFile(file.getAbsolutePath(), options); + } + catch (Exception ex) { + return null; + } + } + + @org.jetbrains.annotations.Contract("null, _ -> true; !null, null -> true") + public static boolean hasPermissions(Context context, String... permissions) { + if (context != null && permissions != null) { + for (String permission : permissions) { + if (ActivityCompat.checkSelfPermission(context, permission) != PackageManager.PERMISSION_GRANTED) { + return false; + } + } + } + return true; + } +} diff --git a/app/src/main/java/com/project/wanderlust/VerifyPhoneNumberActivity.java b/app/src/main/java/com/project/wanderlust/VerifyPhoneNumberActivity.java new file mode 100644 index 0000000..081586b --- /dev/null +++ b/app/src/main/java/com/project/wanderlust/VerifyPhoneNumberActivity.java @@ -0,0 +1,104 @@ +package com.project.wanderlust; + +import android.content.Intent; +import android.support.annotation.NonNull; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.text.Editable; +import android.text.TextWatcher; +import android.view.View; +import android.widget.EditText; +import android.widget.TextView; +import android.widget.Toast; + +import com.google.android.gms.tasks.OnCompleteListener; +import com.google.android.gms.tasks.OnFailureListener; +import com.google.android.gms.tasks.OnSuccessListener; +import com.google.android.gms.tasks.Task; +import com.google.firebase.FirebaseException; +import com.google.firebase.auth.AuthResult; +import com.google.firebase.auth.FirebaseAuth; +import com.google.firebase.auth.PhoneAuthCredential; +import com.google.firebase.auth.PhoneAuthProvider; + +import java.util.concurrent.TimeUnit; + +public class VerifyPhoneNumberActivity extends AppCompatActivity { + FirebaseAuth mAuth; + private static String code = ""; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_verify_phone_number); + mAuth = FirebaseAuth.getInstance(); + + Intent intent = getIntent(); + final String string = (String) intent.getSerializableExtra("phone"); + TextView verify = findViewById(R.id.verify); + verify.setText(R.string.verify_3 + " " + string + " "); + TextView phone = findViewById(R.id.phone); + phone.setText(string); + + //text change listener on text field for 6 digit code + //called whenever user type + EditText text = findViewById(R.id.code); + text.addTextChangedListener(new TextWatcher() { + @Override + public void beforeTextChanged(CharSequence s, int start, int count, int after){} + @Override + public void onTextChanged(CharSequence s, int start, int before, int count) {} + + @Override + public void afterTextChanged(Editable s) { + if(s.length() == 6) { + //making credentials using code sent from firebase and code user typed + PhoneAuthCredential credential = PhoneAuthProvider.getCredential(code, s.toString()); + + //signing in user to firebase if code was correct otherwise showing error message + mAuth.signInWithCredential(credential).addOnSuccessListener(new OnSuccessListener() { + @Override + public void onSuccess(AuthResult authResult) { + Intent intent = new Intent(VerifyPhoneNumberActivity.this, SetProfileData.class); + intent.putExtra("phone", string); + startActivity(intent); + finish(); + } + }).addOnFailureListener(new OnFailureListener() { + @Override + public void onFailure(@NonNull Exception e) { Toast.makeText(VerifyPhoneNumberActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show(); } + }); + } + } + }); + + //signing in user using automatic message recognition + PhoneAuthProvider.getInstance().verifyPhoneNumber(string, 60, TimeUnit.SECONDS, this, + new PhoneAuthProvider.OnVerificationStateChangedCallbacks() { + @Override + public void onVerificationCompleted(PhoneAuthCredential credential) { + mAuth.signInWithCredential(credential).addOnCompleteListener(VerifyPhoneNumberActivity.this, + new OnCompleteListener() { + @Override + public void onComplete(@NonNull Task task) { + Intent intent = new Intent(VerifyPhoneNumberActivity.this, SetProfileData.class); + intent.putExtra("phone", string); + startActivity(intent); + finish(); + } + }); + } + + @Override + public void onVerificationFailed(FirebaseException e) { Toast.makeText(VerifyPhoneNumberActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show(); } + + @Override + public void onCodeSent(String s, PhoneAuthProvider.ForceResendingToken forceResendingToken) { + super.onCodeSent(s, forceResendingToken); + code = s; + } + }); + } + + public void wrongNumber(View view) { onBackPressed(); } +} diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..c7bd21d --- /dev/null +++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/app/src/main/res/drawable/account.xml b/app/src/main/res/drawable/account.xml new file mode 100644 index 0000000..9e076f8 --- /dev/null +++ b/app/src/main/res/drawable/account.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..d5fccc5 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_contacts.xml b/app/src/main/res/layout/activity_contacts.xml new file mode 100644 index 0000000..1e0c108 --- /dev/null +++ b/app/src/main/res/layout/activity_contacts.xml @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_extra.xml b/app/src/main/res/layout/activity_extra.xml new file mode 100644 index 0000000..a637b7e --- /dev/null +++ b/app/src/main/res/layout/activity_extra.xml @@ -0,0 +1,23 @@ + + + +