diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 7ac24c7..fe72da5 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -3,8 +3,9 @@
-
+
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 02cb9c5..328f0ac 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,7 +2,7 @@
-
+
diff --git a/app/.idea/.name b/app/.idea/.name
new file mode 100644
index 0000000..6130eb1
--- /dev/null
+++ b/app/.idea/.name
@@ -0,0 +1 @@
+Auto-App-Generator-Android_Version-
\ No newline at end of file
diff --git a/app/.idea/compiler.xml b/app/.idea/compiler.xml
new file mode 100644
index 0000000..96cc43e
--- /dev/null
+++ b/app/.idea/compiler.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/copyright/profiles_settings.xml b/app/.idea/copyright/profiles_settings.xml
new file mode 100644
index 0000000..e7bedf3
--- /dev/null
+++ b/app/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/app/.idea/gradle.xml b/app/.idea/gradle.xml
new file mode 100644
index 0000000..d417c89
--- /dev/null
+++ b/app/.idea/gradle.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/1_picasso_2_5_2.xml b/app/.idea/libraries/1_picasso_2_5_2.xml
new file mode 100644
index 0000000..ca121c6
--- /dev/null
+++ b/app/.idea/libraries/1_picasso_2_5_2.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/ThinDownloadManager_1_3_0.xml b/app/.idea/libraries/ThinDownloadManager_1_3_0.xml
new file mode 100644
index 0000000..3b16ce3
--- /dev/null
+++ b/app/.idea/libraries/ThinDownloadManager_1_3_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/animated_vector_drawable_25_0_0.xml b/app/.idea/libraries/animated_vector_drawable_25_0_0.xml
new file mode 100644
index 0000000..32310a2
--- /dev/null
+++ b/app/.idea/libraries/animated_vector_drawable_25_0_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/appcompat_v7_25_0_0.xml b/app/.idea/libraries/appcompat_v7_25_0_0.xml
new file mode 100644
index 0000000..aa7a70b
--- /dev/null
+++ b/app/.idea/libraries/appcompat_v7_25_0_0.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/bolts_android_1_4_0.xml b/app/.idea/libraries/bolts_android_1_4_0.xml
new file mode 100644
index 0000000..f6fd908
--- /dev/null
+++ b/app/.idea/libraries/bolts_android_1_4_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/bolts_applinks_1_4_0.xml b/app/.idea/libraries/bolts_applinks_1_4_0.xml
new file mode 100644
index 0000000..5ae08af
--- /dev/null
+++ b/app/.idea/libraries/bolts_applinks_1_4_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/bolts_tasks_1_4_0.xml b/app/.idea/libraries/bolts_tasks_1_4_0.xml
new file mode 100644
index 0000000..3f0dbce
--- /dev/null
+++ b/app/.idea/libraries/bolts_tasks_1_4_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/cardview_v7_25_0_0.xml b/app/.idea/libraries/cardview_v7_25_0_0.xml
new file mode 100644
index 0000000..400951f
--- /dev/null
+++ b/app/.idea/libraries/cardview_v7_25_0_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/converter_gson_2_0_2.xml b/app/.idea/libraries/converter_gson_2_0_2.xml
new file mode 100644
index 0000000..09dd885
--- /dev/null
+++ b/app/.idea/libraries/converter_gson_2_0_2.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/customtabs_25_0_0.xml b/app/.idea/libraries/customtabs_25_0_0.xml
new file mode 100644
index 0000000..13ed771
--- /dev/null
+++ b/app/.idea/libraries/customtabs_25_0_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/design_24_2_1.xml b/app/.idea/libraries/design_24_2_1.xml
new file mode 100644
index 0000000..6ff23d1
--- /dev/null
+++ b/app/.idea/libraries/design_24_2_1.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/espresso_core_2_2_2.xml b/app/.idea/libraries/espresso_core_2_2_2.xml
new file mode 100644
index 0000000..c609aab
--- /dev/null
+++ b/app/.idea/libraries/espresso_core_2_2_2.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/espresso_idling_resource_2_2_2.xml b/app/.idea/libraries/espresso_idling_resource_2_2_2.xml
new file mode 100644
index 0000000..4453ea1
--- /dev/null
+++ b/app/.idea/libraries/espresso_idling_resource_2_2_2.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml b/app/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml
new file mode 100644
index 0000000..6fe037c
--- /dev/null
+++ b/app/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/fabric_1_3_14.xml b/app/.idea/libraries/fabric_1_3_14.xml
new file mode 100644
index 0000000..bc2422e
--- /dev/null
+++ b/app/.idea/libraries/fabric_1_3_14.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/facebook_android_sdk_4_19_0.xml b/app/.idea/libraries/facebook_android_sdk_4_19_0.xml
new file mode 100644
index 0000000..86f8986
--- /dev/null
+++ b/app/.idea/libraries/facebook_android_sdk_4_19_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/firebase_analytics_9_0_0.xml b/app/.idea/libraries/firebase_analytics_9_0_0.xml
new file mode 100644
index 0000000..13ef6b7
--- /dev/null
+++ b/app/.idea/libraries/firebase_analytics_9_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/firebase_analytics_impl_9_0_0.xml b/app/.idea/libraries/firebase_analytics_impl_9_0_0.xml
new file mode 100644
index 0000000..c98e568
--- /dev/null
+++ b/app/.idea/libraries/firebase_analytics_impl_9_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/firebase_common_9_0_0.xml b/app/.idea/libraries/firebase_common_9_0_0.xml
new file mode 100644
index 0000000..b90e60a
--- /dev/null
+++ b/app/.idea/libraries/firebase_common_9_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/firebase_core_9_0_0.xml b/app/.idea/libraries/firebase_core_9_0_0.xml
new file mode 100644
index 0000000..d8bd9d7
--- /dev/null
+++ b/app/.idea/libraries/firebase_core_9_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/firebase_iid_9_0_0.xml b/app/.idea/libraries/firebase_iid_9_0_0.xml
new file mode 100644
index 0000000..aec0254
--- /dev/null
+++ b/app/.idea/libraries/firebase_iid_9_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/floatingactionbutton_1_10_1.xml b/app/.idea/libraries/floatingactionbutton_1_10_1.xml
new file mode 100644
index 0000000..0aceed9
--- /dev/null
+++ b/app/.idea/libraries/floatingactionbutton_1_10_1.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/gson_2_6_1.xml b/app/.idea/libraries/gson_2_6_1.xml
new file mode 100644
index 0000000..8d92ac1
--- /dev/null
+++ b/app/.idea/libraries/gson_2_6_1.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/hamcrest_core_1_3.xml b/app/.idea/libraries/hamcrest_core_1_3.xml
new file mode 100644
index 0000000..157e3f3
--- /dev/null
+++ b/app/.idea/libraries/hamcrest_core_1_3.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/hamcrest_integration_1_3.xml b/app/.idea/libraries/hamcrest_integration_1_3.xml
new file mode 100644
index 0000000..58b2c4b
--- /dev/null
+++ b/app/.idea/libraries/hamcrest_integration_1_3.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/hamcrest_library_1_3.xml b/app/.idea/libraries/hamcrest_library_1_3.xml
new file mode 100644
index 0000000..676cc63
--- /dev/null
+++ b/app/.idea/libraries/hamcrest_library_1_3.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/javawriter_2_1_1.xml b/app/.idea/libraries/javawriter_2_1_1.xml
new file mode 100644
index 0000000..a66fefb
--- /dev/null
+++ b/app/.idea/libraries/javawriter_2_1_1.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/javax_annotation_api_1_2.xml b/app/.idea/libraries/javax_annotation_api_1_2.xml
new file mode 100644
index 0000000..811e73f
--- /dev/null
+++ b/app/.idea/libraries/javax_annotation_api_1_2.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/javax_inject_1.xml b/app/.idea/libraries/javax_inject_1.xml
new file mode 100644
index 0000000..eebeedd
--- /dev/null
+++ b/app/.idea/libraries/javax_inject_1.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/jsr305_2_0_1.xml b/app/.idea/libraries/jsr305_2_0_1.xml
new file mode 100644
index 0000000..cdf9878
--- /dev/null
+++ b/app/.idea/libraries/jsr305_2_0_1.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/junit_4_12.xml b/app/.idea/libraries/junit_4_12.xml
new file mode 100644
index 0000000..305df30
--- /dev/null
+++ b/app/.idea/libraries/junit_4_12.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/multidex_1_0_0.xml b/app/.idea/libraries/multidex_1_0_0.xml
new file mode 100644
index 0000000..df3bdb4
--- /dev/null
+++ b/app/.idea/libraries/multidex_1_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/okhttp_3_2_0.xml b/app/.idea/libraries/okhttp_3_2_0.xml
new file mode 100644
index 0000000..9c3d502
--- /dev/null
+++ b/app/.idea/libraries/okhttp_3_2_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/okio_1_6_0.xml b/app/.idea/libraries/okio_1_6_0.xml
new file mode 100644
index 0000000..ec753df
--- /dev/null
+++ b/app/.idea/libraries/okio_1_6_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/picasso_2_5_2.xml b/app/.idea/libraries/picasso_2_5_2.xml
new file mode 100644
index 0000000..b05e3b6
--- /dev/null
+++ b/app/.idea/libraries/picasso_2_5_2.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/play_services_auth_9_0_0.xml b/app/.idea/libraries/play_services_auth_9_0_0.xml
new file mode 100644
index 0000000..467715d
--- /dev/null
+++ b/app/.idea/libraries/play_services_auth_9_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/play_services_auth_base_9_0_0.xml b/app/.idea/libraries/play_services_auth_base_9_0_0.xml
new file mode 100644
index 0000000..3bf6a29
--- /dev/null
+++ b/app/.idea/libraries/play_services_auth_base_9_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/play_services_base_9_0_0.xml b/app/.idea/libraries/play_services_base_9_0_0.xml
new file mode 100644
index 0000000..e39ce34
--- /dev/null
+++ b/app/.idea/libraries/play_services_base_9_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/play_services_basement_9_0_0.xml b/app/.idea/libraries/play_services_basement_9_0_0.xml
new file mode 100644
index 0000000..a32a4ef
--- /dev/null
+++ b/app/.idea/libraries/play_services_basement_9_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/play_services_tasks_9_0_0.xml b/app/.idea/libraries/play_services_tasks_9_0_0.xml
new file mode 100644
index 0000000..6d6cb95
--- /dev/null
+++ b/app/.idea/libraries/play_services_tasks_9_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/recyclerview_v7_24_2_1.xml b/app/.idea/libraries/recyclerview_v7_24_2_1.xml
new file mode 100644
index 0000000..e5a5dbe
--- /dev/null
+++ b/app/.idea/libraries/recyclerview_v7_24_2_1.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/retrofit_2_0_2.xml b/app/.idea/libraries/retrofit_2_0_2.xml
new file mode 100644
index 0000000..df55897
--- /dev/null
+++ b/app/.idea/libraries/retrofit_2_0_2.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/rules_0_5.xml b/app/.idea/libraries/rules_0_5.xml
new file mode 100644
index 0000000..791524b
--- /dev/null
+++ b/app/.idea/libraries/rules_0_5.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/runner_0_5.xml b/app/.idea/libraries/runner_0_5.xml
new file mode 100644
index 0000000..51b1cec
--- /dev/null
+++ b/app/.idea/libraries/runner_0_5.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/support_annotations_25_0_0.xml b/app/.idea/libraries/support_annotations_25_0_0.xml
new file mode 100644
index 0000000..5c73892
--- /dev/null
+++ b/app/.idea/libraries/support_annotations_25_0_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/support_compat_25_0_0.xml b/app/.idea/libraries/support_compat_25_0_0.xml
new file mode 100644
index 0000000..d949e78
--- /dev/null
+++ b/app/.idea/libraries/support_compat_25_0_0.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/support_core_ui_25_0_0.xml b/app/.idea/libraries/support_core_ui_25_0_0.xml
new file mode 100644
index 0000000..b46a049
--- /dev/null
+++ b/app/.idea/libraries/support_core_ui_25_0_0.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/support_core_utils_25_0_0.xml b/app/.idea/libraries/support_core_utils_25_0_0.xml
new file mode 100644
index 0000000..bab5cb9
--- /dev/null
+++ b/app/.idea/libraries/support_core_utils_25_0_0.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/support_fragment_25_0_0.xml b/app/.idea/libraries/support_fragment_25_0_0.xml
new file mode 100644
index 0000000..83016f5
--- /dev/null
+++ b/app/.idea/libraries/support_fragment_25_0_0.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/support_media_compat_25_0_0.xml b/app/.idea/libraries/support_media_compat_25_0_0.xml
new file mode 100644
index 0000000..04a97ef
--- /dev/null
+++ b/app/.idea/libraries/support_media_compat_25_0_0.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/support_v4_25_0_0.xml b/app/.idea/libraries/support_v4_25_0_0.xml
new file mode 100644
index 0000000..f05f2ec
--- /dev/null
+++ b/app/.idea/libraries/support_v4_25_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/support_vector_drawable_25_0_0.xml b/app/.idea/libraries/support_vector_drawable_25_0_0.xml
new file mode 100644
index 0000000..6db3fc1
--- /dev/null
+++ b/app/.idea/libraries/support_vector_drawable_25_0_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/tweet_composer_2_3_1.xml b/app/.idea/libraries/tweet_composer_2_3_1.xml
new file mode 100644
index 0000000..130d29e
--- /dev/null
+++ b/app/.idea/libraries/tweet_composer_2_3_1.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/tweet_ui_2_3_1.xml b/app/.idea/libraries/tweet_ui_2_3_1.xml
new file mode 100644
index 0000000..7442b44
--- /dev/null
+++ b/app/.idea/libraries/tweet_ui_2_3_1.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/twitter_2_3_1.xml b/app/.idea/libraries/twitter_2_3_1.xml
new file mode 100644
index 0000000..30bf58e
--- /dev/null
+++ b/app/.idea/libraries/twitter_2_3_1.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/twitter_core_2_3_0.xml b/app/.idea/libraries/twitter_core_2_3_0.xml
new file mode 100644
index 0000000..44173ad
--- /dev/null
+++ b/app/.idea/libraries/twitter_core_2_3_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/twitter_text_1_13_0.xml b/app/.idea/libraries/twitter_text_1_13_0.xml
new file mode 100644
index 0000000..4ab5ba0
--- /dev/null
+++ b/app/.idea/libraries/twitter_text_1_13_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/universal_image_loader_1_9_5.xml b/app/.idea/libraries/universal_image_loader_1_9_5.xml
new file mode 100644
index 0000000..a677747
--- /dev/null
+++ b/app/.idea/libraries/universal_image_loader_1_9_5.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/volley_1_0_0.xml b/app/.idea/libraries/volley_1_0_0.xml
new file mode 100644
index 0000000..4c34235
--- /dev/null
+++ b/app/.idea/libraries/volley_1_0_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/misc.xml b/app/.idea/misc.xml
new file mode 100644
index 0000000..5d19981
--- /dev/null
+++ b/app/.idea/misc.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/modules.xml b/app/.idea/modules.xml
new file mode 100644
index 0000000..67a0f26
--- /dev/null
+++ b/app/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/runConfigurations.xml b/app/.idea/runConfigurations.xml
new file mode 100644
index 0000000..7f68460
--- /dev/null
+++ b/app/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/vcs.xml b/app/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/app/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/workspace.xml b/app/.idea/workspace.xml
new file mode 100644
index 0000000..e6ee494
--- /dev/null
+++ b/app/.idea/workspace.xml
@@ -0,0 +1,3062 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1485544039448
+
+
+ 1485544039448
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index a5351c8..e664dcd 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -46,15 +46,16 @@ dependencies {
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
- compile 'com.android.support:multidex:1.0.0'
+ compile 'com.android.support:multidex:1.0.0' // What is this for
compile 'com.android.support:support-v4:24.2.1'
compile 'com.google.android.gms:play-services-auth:9.0.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.volley:volley:1.0.0'
compile 'com.getbase:floatingactionbutton:1.10.1'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
- compile 'com.squareup.picasso:picasso:2.5.2'
- compile 'com.mani:ThinDownloadManager:1.3.0' //check wheather to use this or not for downloading Videos
+ compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
+ compile 'com.squareup.picasso:picasso:2.5.2' //As using UIL we can now remove picasso
+ compile 'com.mani:ThinDownloadManager:1.3.0' //check wheather to use this or not for downloading Videos
testCompile 'junit:junit:4.12'
compile('com.twitter.sdk.android:twitter:2.3.1@aar') {
transitive = true;
diff --git a/app/gradle/wrapper/gradle-wrapper.jar b/app/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..13372ae
Binary files /dev/null and b/app/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/app/gradle/wrapper/gradle-wrapper.properties b/app/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..04e285f
--- /dev/null
+++ b/app/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Mon Dec 28 10:00:20 PST 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
diff --git a/app/gradlew b/app/gradlew
new file mode 100644
index 0000000..9d82f78
--- /dev/null
+++ b/app/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/app/gradlew.bat b/app/gradlew.bat
new file mode 100644
index 0000000..aec9973
--- /dev/null
+++ b/app/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/app/local.properties b/app/local.properties
new file mode 100644
index 0000000..fbb8962
--- /dev/null
+++ b/app/local.properties
@@ -0,0 +1,11 @@
+## This file is automatically generated by Android Studio.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+#
+# Location of the SDK. This is only used by Gradle.
+# For customization when using a Version Control System, please read the
+# header note.
+#Sat Jan 28 00:37:19 IST 2017
+sdk.dir=/Users/utkarshnath/Library/Android/sdk
diff --git a/app/src/androidTest/java/com/developer/sparsh/baseapplication/DatabaseUnitTest.java b/app/src/androidTest/java/com/developer/sparsh/baseapplication/DatabaseUnitTest.java
new file mode 100644
index 0000000..bc1175b
--- /dev/null
+++ b/app/src/androidTest/java/com/developer/sparsh/baseapplication/DatabaseUnitTest.java
@@ -0,0 +1,209 @@
+package com.developer.sparsh.baseapplication;
+
+import android.content.ContentValues;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteOpenHelper;
+import android.support.test.runner.AndroidJUnit4;
+
+import com.developer.sparsh.baseapplication.Helpers.DatabaseHelper;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.Date;
+import java.util.Map;
+import java.util.Set;
+
+import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Created by SPARSH on 1/27/2017.
+ */
+@RunWith(AndroidJUnit4.class)
+public class DatabaseUnitTest {
+
+ private static SQLiteOpenHelper mHelper;
+
+ @Test
+ public void testCreateDb() throws Exception{
+ mHelper = new DatabaseHelper(getTargetContext());
+ SQLiteDatabase mDatabase = mHelper.getWritableDatabase();
+
+ assertEquals(true , mDatabase.isOpen());
+ mDatabase.close();
+ }
+
+ // Test for checking whether insertion and deletion works in the database tables
+ @Test
+ public void testInsertReadDb() throws Exception{
+ SQLiteDatabase db = mHelper.getWritableDatabase();
+
+ ContentValues postValues = getPostContentValues();
+ ContentValues inviteesValues = getInviteesContentValues();
+ ContentValues commentsValues = getCommentsContentValues();
+ ContentValues likesValues = getLikesContentValues();
+ ContentValues commentLikesValues = getCommentsLikesContentValues();
+ ContentValues commentRepliesValues = getCommentsRepliesContentValues();
+
+ long _id = db.insert(DatabaseHelper.Post_Table, null , postValues);
+ assertNotEquals(_id , -1);
+
+ _id = db.insert(DatabaseHelper.Invitees_Table, null , inviteesValues);
+ assertNotEquals(_id, -1);
+
+ _id = db.insert(DatabaseHelper.Comments_Table, null , commentsValues);
+ assertNotEquals(_id, -1);
+
+ _id = db.insert(DatabaseHelper.Likes_Table, null , likesValues);
+ assertNotEquals(_id, -1);
+
+ _id = db.insert(DatabaseHelper.Comments_Likes_Table, null , commentLikesValues);
+ assertNotEquals(_id, -1);
+
+ _id = db.insert(DatabaseHelper.Comments_Replies_Table, null , commentRepliesValues);
+ assertNotEquals(_id, -1);
+
+ // Now query the database
+ Cursor cursor = db.query(DatabaseHelper.Post_Table,null,null,null,null,null,null);
+ validateCursor(cursor,postValues);
+
+ cursor = db.query(DatabaseHelper.Invitees_Table,null,null,null,null,null,null);
+ validateCursor(cursor,inviteesValues);
+
+ cursor = db.query(DatabaseHelper.Comments_Table,null,null,null,null,null,null);
+ validateCursor(cursor,commentsValues);
+
+ cursor = db.query(DatabaseHelper.Likes_Table,null,null,null,null,null,null);
+ validateCursor(cursor,likesValues);
+
+ cursor = db.query(DatabaseHelper.Comments_Likes_Table,null,null,null,null,null,null);
+ validateCursor(cursor,commentLikesValues);
+
+ cursor = db.query(DatabaseHelper.Comments_Replies_Table,null,null,null,null,null,null);
+ validateCursor(cursor,commentRepliesValues);
+ }
+
+
+ private static ContentValues getPostContentValues(){
+
+ String postId = "jdncskcj1in32jn33jn";
+ String postByInviteeId = "3298ru493823932";
+ String postDescription = "This is a test post";
+ String postType = "image";
+ String postFileUrl = "http://www.google.com";
+ long timestamp = new Date().getTime();
+
+
+ ContentValues values = new ContentValues();
+
+ values.put(DatabaseHelper.Post_ID , postId);
+ values.put(DatabaseHelper.Post_By_Invitee_Id, postByInviteeId);
+ values.put(DatabaseHelper.Post_Discription , postDescription);
+ values.put(DatabaseHelper.Post_Type , postType);
+ values.put(DatabaseHelper.Post_File_Url , postFileUrl);
+ values.put(DatabaseHelper.Post_TimeStamp , timestamp);
+
+ return values;
+ }
+
+ private static ContentValues getInviteesContentValues(){
+ ContentValues values = new ContentValues();
+
+ String userId = "394324u2934ide";
+ String inviteeGoing = "yes";
+ String inviteeName = "utkarsh nath";
+ String inviteeDp = "file://sdcard/emulated/0/app/file.jpg";
+
+ values.put(DatabaseHelper.User_Id , userId);
+ values.put(DatabaseHelper.Invitee_Going , inviteeGoing);
+ values.put(DatabaseHelper.Invitee_Dp , inviteeDp);
+ values.put(DatabaseHelper.Invitee_Name , inviteeName);
+
+ return values;
+ }
+
+ private static ContentValues getCommentsContentValues(){
+
+ ContentValues values = new ContentValues();
+
+ String commentId = "jsdcn23idn2iun";
+ String commentByInviteeId = "dwek23id239dj2";
+ String postId = "jdncskcj1in32jn33jn";
+ long timestamp = new Date().getTime();
+ String commentDescription = "this is a test comment";
+
+ values.put(DatabaseHelper.Comment_ID,commentId);
+ values.put(DatabaseHelper.Comment_By_Invitee_Id , commentByInviteeId);
+ values.put(DatabaseHelper.Comment_Post_Id, postId);
+ values.put(DatabaseHelper.Comment_TimeStamp , timestamp);
+ values.put(DatabaseHelper.Comment_Discription , commentDescription);
+
+ return values;
+ }
+
+ private static ContentValues getLikesContentValues(){
+
+ ContentValues values = new ContentValues();
+
+ String likeId = "jsdcnxsa23idn2iun";
+ String likeByInviteeId = "dwek23id239dj2";
+ String postId = "jdncskcj1in32jn33jn";
+
+
+ values.put(DatabaseHelper.Like_ID,likeId);
+ values.put(DatabaseHelper.Likes_By_Invitee_Id , likeByInviteeId);
+ values.put(DatabaseHelper.Likes_Post_Id, postId);
+
+ return values;
+ }
+
+ private static ContentValues getCommentsLikesContentValues(){
+
+ ContentValues values = new ContentValues();
+
+ String commentLikeId = "cdjskc3498nc39";
+ String commentLikeByInviteeId = "dwek23id239dj2";
+ String likesCommentId = "jsdcn23idn2iun";
+
+
+ values.put(DatabaseHelper.Comment_Like_ID,commentLikeId);
+ values.put(DatabaseHelper.Comments_Likes_By_Invitee_Id , commentLikeByInviteeId);
+ values.put(DatabaseHelper.Likes_Comment_Id, likesCommentId);
+
+ return values;
+ }
+
+ private static ContentValues getCommentsRepliesContentValues(){
+
+ ContentValues values = new ContentValues();
+
+ String commentReplyId = "cdjskc3498nc39";
+ String commentReplyByInviteeId = "dwek23id239dj2";
+ String repliesCommentId = "jsdcn23idn2iun";
+ String commentsReply = "Testing is boring";
+ long timestamp = new Date().getTime();
+
+ values.put(DatabaseHelper.Comment_Replies_ID,commentReplyId);
+ values.put(DatabaseHelper.Comment_By_Invitee_Id , commentReplyByInviteeId);
+ values.put(DatabaseHelper.Replies_Comment_Id, repliesCommentId);
+ values.put(DatabaseHelper.Replies_TimeStamp , timestamp);
+ values.put(DatabaseHelper.Comments_Reply , commentsReply);
+ return values;
+ }
+
+ public void validateCursor(Cursor valueCursor , ContentValues expectedValues){
+
+ assertTrue(valueCursor.moveToFirst());
+ Set> valueSet = expectedValues.valueSet();
+ for(Map.Entry entry : valueSet){
+ int idx = valueCursor.getColumnIndex(entry.getKey());
+ String expectedValue = entry.getValue().toString();
+ assertEquals(expectedValue , valueCursor.getString(idx));
+ }
+ valueCursor.close();
+ }
+}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 48160af..52eb7e6 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -14,6 +14,7 @@
-
-
-
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/developer/sparsh/baseapplication/Adapters/CursorRecyclerViewAdapter.java b/app/src/main/java/com/developer/sparsh/baseapplication/Adapters/CursorRecyclerViewAdapter.java
new file mode 100644
index 0000000..60442ac
--- /dev/null
+++ b/app/src/main/java/com/developer/sparsh/baseapplication/Adapters/CursorRecyclerViewAdapter.java
@@ -0,0 +1,68 @@
+package com.developer.sparsh.baseapplication.Adapters;
+
+import android.content.Context;
+import android.content.IntentFilter;
+import android.database.Cursor;
+import android.support.v7.widget.RecyclerView;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.developer.sparsh.baseapplication.R;
+
+/**
+ * Created by SPARSH on 1/27/2017.
+ */
+
+public abstract class CursorRecyclerViewAdapter extends RecyclerView.Adapter {
+
+ private final Context context;
+ private Cursor mCursor;
+
+
+ public CursorRecyclerViewAdapter(Context context, Cursor mCursor) {
+ this.context = context;
+ this.mCursor = mCursor;
+
+ }
+
+ public abstract void onBindViewHolder(VH viewHolder, Cursor cursor);
+
+ @Override
+ public void onBindViewHolder(VH holder, int position) {
+ if (mCursor != null) {
+ if (mCursor.moveToPosition(position))
+ onBindViewHolder(holder, mCursor);
+ else
+ throw new IllegalStateException("couldn't move the cursor to postion " + position);
+ }
+ }
+
+ @Override
+ public int getItemCount() {
+ if (mCursor != null)
+ return mCursor.getCount();
+ else
+ return 0;
+ }
+
+ @Override
+ public void setHasStableIds(boolean hasStableIds) {
+ super.setHasStableIds(true);
+ }
+
+ public Cursor swapCursor(Cursor newCursor) {
+ Log.d("!@#", "swapCursor: cursor swapped");
+ final Cursor oldCursor = newCursor;
+
+ mCursor = newCursor;
+ notifyDataSetChanged();
+
+ return oldCursor;
+ }
+
+}
diff --git a/app/src/main/java/com/developer/sparsh/baseapplication/Adapters/FeedCursorAdapter.java b/app/src/main/java/com/developer/sparsh/baseapplication/Adapters/FeedCursorAdapter.java
new file mode 100644
index 0000000..065f579
--- /dev/null
+++ b/app/src/main/java/com/developer/sparsh/baseapplication/Adapters/FeedCursorAdapter.java
@@ -0,0 +1,76 @@
+package com.developer.sparsh.baseapplication.Adapters;
+
+import android.content.Context;
+import android.database.Cursor;
+import android.support.v7.widget.RecyclerView;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+
+import com.developer.sparsh.baseapplication.Helpers.DatabaseHelper;
+import com.developer.sparsh.baseapplication.R;
+import com.nostra13.universalimageloader.core.ImageLoader;
+
+
+/**
+ * Created by SPARSH on 1/27/2017.
+ */
+
+public class FeedCursorAdapter extends CursorRecyclerViewAdapter {
+
+ Context context;
+ DatabaseHelper helper;
+ public FeedCursorAdapter(Context context, Cursor mCursor) {
+ super(context, mCursor);
+ this.context = context;
+ helper = new DatabaseHelper(context);
+ }
+
+ @Override
+ public void onBindViewHolder(VH viewHolder, Cursor cursor) {
+ viewHolder.description.setText(cursor.getString(cursor.getColumnIndex(helper.Post_Discription)));
+ String pictureUri = cursor.getString(cursor.getColumnIndex(helper.Post_File_Url));
+ ImageLoader imageLoader = ImageLoader.getInstance();
+ imageLoader.displayImage(pictureUri, viewHolder.uploadedPhoto);
+ }
+
+
+ @Override
+ public VH onCreateViewHolder(ViewGroup parent, int viewType) {
+ View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post, parent, false);
+ return new VH(itemView);
+ }
+
+ class VH extends RecyclerView.ViewHolder {
+
+ public FrameLayout postCard;
+ public ImageView UploaderPhoto;
+ public TextView Uploadername;
+ public TextView description;
+ public ImageView uploadedPhoto;
+ public ImageView shareButton;
+ public ImageView commentButton;
+ public ImageView downloadButton;
+ public ImageView shareExternalButton;
+
+ public VH(View itemView) {
+
+ super(itemView);
+
+ postCard = (FrameLayout) itemView.findViewById(R.id.cv);
+ Uploadername = (TextView) itemView.findViewById(R.id.uploaderName);
+ UploaderPhoto = (ImageView) itemView.findViewById(R.id.uploaderdp);
+ description = (TextView) itemView.findViewById(R.id.discription);
+ uploadedPhoto = (ImageView) itemView.findViewById(R.id.uploadedImage);
+ commentButton = (ImageView) itemView.findViewById(R.id.commentbutton);
+ downloadButton = (ImageView) itemView.findViewById(R.id.downloadbutton);
+ shareButton = (ImageView) itemView.findViewById(R.id.share_button);
+ shareExternalButton = (ImageView) itemView.findViewById(R.id.share_external_button);
+ }
+ }
+}
diff --git a/app/src/main/java/com/developer/sparsh/baseapplication/Application/Application.java b/app/src/main/java/com/developer/sparsh/baseapplication/Application/Application.java
new file mode 100644
index 0000000..a3f9c3e
--- /dev/null
+++ b/app/src/main/java/com/developer/sparsh/baseapplication/Application/Application.java
@@ -0,0 +1,31 @@
+package com.developer.sparsh.baseapplication.Application;
+
+import com.nostra13.universalimageloader.core.DisplayImageOptions;
+import com.nostra13.universalimageloader.core.ImageLoader;
+import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
+
+/**
+ * Created by utkarshnath on 03/02/17.
+ */
+
+public class Application extends android.app.Application {
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
+ .cacheInMemory(true)
+ .cacheOnDisk(true)
+ .build();
+
+ ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext())
+ .defaultDisplayImageOptions(defaultOptions)
+ .build();
+
+ ImageLoader.getInstance().init(config);
+ }
+
+
+
+
+}
diff --git a/app/src/main/java/com/developer/sparsh/baseapplication/Fragments/Feed_Fragment.java b/app/src/main/java/com/developer/sparsh/baseapplication/Fragments/Feed_Fragment.java
index ce3ccf4..7d59d84 100644
--- a/app/src/main/java/com/developer/sparsh/baseapplication/Fragments/Feed_Fragment.java
+++ b/app/src/main/java/com/developer/sparsh/baseapplication/Fragments/Feed_Fragment.java
@@ -11,7 +11,11 @@
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
+import android.renderscript.Sampler;
import android.support.v4.app.Fragment;
+import android.support.v4.app.LoaderManager;
+import android.support.v4.content.CursorLoader;
+import android.support.v4.content.Loader;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
@@ -28,6 +32,7 @@
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.developer.sparsh.baseapplication.Adapters.FeedAdapter;
+import com.developer.sparsh.baseapplication.Adapters.FeedCursorAdapter;
import com.developer.sparsh.baseapplication.Helpers.DatabaseContract;
import com.developer.sparsh.baseapplication.Helpers.DatabaseHelper;
import com.developer.sparsh.baseapplication.Interface.FileUpload;
@@ -47,8 +52,12 @@
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
@@ -63,18 +72,18 @@
/**
* A simple {@link Fragment} subclass.
*/
-public class Feed_Fragment extends Fragment {
+public class Feed_Fragment extends Fragment implements LoaderManager.LoaderCallbacks {
private File photoFile = null;
- private String TAG = "Feed Fragment";
+ private String TAG = "!@#";
private static final int SELECT_PICTURE = 0;
static final int REQUEST_IMAGE_CAPTURE = 1;
static final int REQUEST_VIDEO_CAPTURE = 2;
- private static String USER_POST_URL = "http://192.168.0.100:3000/api/v1/";
+ private static String USER_POST_URL = "http://223.179.128.215/api/v1/";
private RecyclerView feed_recyclerview;
- private FeedAdapter adapter;
+ private FeedCursorAdapter mAdapter = null;
private RequestQueue queue;
- private String GET_POST_URL = "";
+ private String GET_POST_URL = "http://223.179.128.215/api/v1/post/?appId=";
private String GET_INVITEES_URL = "";
private DatabaseHelper helper;
private ThinDownloadManager downloadManager;
@@ -95,10 +104,18 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
helper = new DatabaseHelper(getActivity());
feed_recyclerview = (RecyclerView) view.findViewById(R.id.feed_recycler_view);
feed_recyclerview.setLayoutManager(new LinearLayoutManager(getActivity()));
- feed_recyclerview.setAdapter(adapter);
+ mAdapter = new FeedCursorAdapter(getContext() , null);
+ feed_recyclerview.setAdapter(mAdapter);
+ downloadEveryThing(1);
return view;
}
+ @Override
+ public void onResume() {
+ super.onResume();
+ getLoaderManager().restartLoader(100,null,this);
+ }
+
private void setUpFloatingActionMenu(View v) {
com.getbase.floatingactionbutton.FloatingActionButton galleryImageAction =
@@ -242,7 +259,6 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
}
if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK){
Uri imageUri = Uri.fromFile(photoFile);
- //String imageString = getImagePath(imageUri);
uploadFile(imageUri.getPath());
}
if (requestCode == REQUEST_VIDEO_CAPTURE && resultCode == RESULT_OK) {
@@ -258,18 +274,20 @@ private void uploadFile(String path) {
RequestBody requestFile =
RequestBody.create(MediaType.parse("multipart/form-data"), file);
MultipartBody.Part body =
- MultipartBody.Part.createFormData("picture", file.getName(), requestFile);
+ MultipartBody.Part.createFormData("postData", file.getName(), requestFile);
// DUMMY DATA
String tittle = "hello, this is description speaking";
String type = "image";
long createdAt = System.currentTimeMillis()/1000;
- String user_id = "1212rf32423";
+ String userId = "587b2fff673c3a251c3478fe";
+ String appId = "588c9af02561712a0c1e93cb";
RequestBody post_type = RequestBody.create(MediaType.parse("multipart/form-data"), String.valueOf(type));
RequestBody description = RequestBody.create(MediaType.parse("multipart/form-data"), tittle);
+ RequestBody appid = RequestBody.create(MediaType.parse("multipart/form-data"), appId);
RequestBody created_timestamp = RequestBody.create(MediaType.parse("multipart/form-data"), String.valueOf(createdAt));
- RequestBody uploader_id = RequestBody.create(MediaType.parse("multipart/form-data"), user_id);
+ RequestBody uploader_id = RequestBody.create(MediaType.parse("multipart/form-data"), userId);
- Call call = service.upload(uploader_id,created_timestamp,description,post_type,body);
+ Call call = service.upload(uploader_id,appid,created_timestamp,description,post_type,body);
call.enqueue(new Callback() {
@Override
public void onResponse(Call call, retrofit2.Response response) {
@@ -285,22 +303,28 @@ public void onFailure(Call call, Throwable t) {
// ***************************************************** FETCHING EVERY THING FROM SERVER **********************************
void downloadEveryThing(int limit){
- downloadPost(limit);
- downloadInvitees();
+ try {
+ downloadPost(limit);
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ //downloadInvitees();
//download event details
}
- private void downloadPost(int limit){
- StringRequest stringRequest = new StringRequest(Request.Method.GET, GET_POST_URL+"/"+limit+"/",
+ private void downloadPost(int limit) throws UnsupportedEncodingException {
+ String appId = "587b2fff673c3a251c3478fe";
+ StringRequest stringRequest = new StringRequest(Request.Method.GET, GET_POST_URL+ URLEncoder.encode(appId, "UTF-8"),
new Response.Listener() {
@Override
public void onResponse(String response) {
+ Log.d("!@#","resposnse "+ response);
try {
JSONArray postArray = new JSONArray(response);
for(int i=0;i onCreateLoader(int id, Bundle args) {
+ return new CursorLoader(getContext() ,
+ DatabaseContract.POST_CONTENT_URI,
+ null,
+ null,
+ null,
+ null
+ );
+ }
+
+ @Override
+ public void onLoadFinished(Loader loader, Cursor data) {
+ // TODO Swap cursor
+ mAdapter.swapCursor(data);
+
+ }
+
+ @Override
+ public void onLoaderReset(Loader loader) {
+ mAdapter.swapCursor(null);
+ }
+
}
diff --git a/app/src/main/java/com/developer/sparsh/baseapplication/Helpers/DataProvider.java b/app/src/main/java/com/developer/sparsh/baseapplication/Helpers/DataProvider.java
index 5439c06..45efc08 100644
--- a/app/src/main/java/com/developer/sparsh/baseapplication/Helpers/DataProvider.java
+++ b/app/src/main/java/com/developer/sparsh/baseapplication/Helpers/DataProvider.java
@@ -15,7 +15,7 @@
public class DataProvider extends ContentProvider {
private DatabaseHelper helper;
private static final UriMatcher uriMatcher = buildUriMatcher();
- private static final String TAG = DataProvider.class.getSimpleName();
+ private static final String TAG = "!@#";
private static final int INVITEE_TABLE = 100;
private static final int POST_TABLE = 101;
private static final int COMMENTS_TABLE = 102;
@@ -34,6 +34,7 @@ public boolean onCreate() {
@Nullable
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
+ Log.d(TAG, "query: queried database");
Cursor cursor = null;
final int match = uriMatcher.match(uri);
switch (match){
@@ -214,12 +215,14 @@ public int delete(Uri uri, String selection, String[] selectionArgs) {
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
final int match = uriMatcher.match(uri);
+ Log.d("!@#","Update uri");
int rowsUpdated = 0;
switch (match){
case INVITEE_TABLE:
rowsUpdated = helper.getWritableDatabase().update(helper.Invitees_Table,values,selection,selectionArgs);
break;
case POST_TABLE:
+ Log.d("!@#","Updating");
rowsUpdated = helper.getWritableDatabase().update(helper.Post_Table,values,selection,selectionArgs);
break;
case COMMENTS_TABLE:
diff --git a/app/src/main/java/com/developer/sparsh/baseapplication/Helpers/DatabaseHelper.java b/app/src/main/java/com/developer/sparsh/baseapplication/Helpers/DatabaseHelper.java
index 0fbd900..46c02f5 100644
--- a/app/src/main/java/com/developer/sparsh/baseapplication/Helpers/DatabaseHelper.java
+++ b/app/src/main/java/com/developer/sparsh/baseapplication/Helpers/DatabaseHelper.java
@@ -50,7 +50,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
public static final String Replies_Comment_Id = "Replies_Comment_Id";
- public static int version = 1;
+ public static int version = 2;
public DatabaseHelper(Context context) {
super(context,Database_Name, null, version);
diff --git a/app/src/main/java/com/developer/sparsh/baseapplication/Interface/FileUpload.java b/app/src/main/java/com/developer/sparsh/baseapplication/Interface/FileUpload.java
index 7c5d40e..9cfcce8 100644
--- a/app/src/main/java/com/developer/sparsh/baseapplication/Interface/FileUpload.java
+++ b/app/src/main/java/com/developer/sparsh/baseapplication/Interface/FileUpload.java
@@ -15,10 +15,11 @@
public interface FileUpload {
@Multipart
@POST("post/")
- Call upload(@Part("uploaded_by") RequestBody uploaded_by,
- @Part("created_at") RequestBody created_at,
- @Part("discription") RequestBody discription,
- @Part("type") RequestBody type,
+ Call upload(@Part("appId") RequestBody appId,
+ @Part("userId") RequestBody userId,
+ @Part("timestamp") RequestBody created_at,
+ @Part("description") RequestBody discription,
+ @Part("mimeType") RequestBody type,
@Part MultipartBody.Part file);
}
diff --git a/app/src/main/java/com/developer/sparsh/baseapplication/LoginActivity.java b/app/src/main/java/com/developer/sparsh/baseapplication/LoginActivity.java
index b416c1f..0ae65b5 100644
--- a/app/src/main/java/com/developer/sparsh/baseapplication/LoginActivity.java
+++ b/app/src/main/java/com/developer/sparsh/baseapplication/LoginActivity.java
@@ -206,7 +206,6 @@ protected Map getParams(){
params.put("type","LOCAL");
return params;
}
-
};
requestQueue.add(stringRequest);
}
diff --git a/build.gradle b/build.gradle
index f67b280..6edcc32 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,7 +7,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.2.0'
+ classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files