diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2c73733
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,37 @@
+# Built application files
+/*/build/
+
+# Crashlytics configuations
+com_crashlytics_export_strings.xml
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Gradle generated files
+.gradle/
+
+# Signing files
+.signing/
+
+# User-specific configurations
+.idea/libraries/
+.idea/workspace.xml
+.idea/tasks.xml
+.idea/.name
+.idea/compiler.xml
+.idea/copyright/profiles_settings.xml
+.idea/encodings.xml
+.idea/misc.xml
+.idea/modules.xml
+.idea/scopes/scope_settings.xml
+.idea/vcs.xml
+*.iml
+
+# OS-specific files
+.DS_Store
+.DS_Store?
+._*
+.Spotlight-V100
+.Trashes
+ehthumbs.db
+Thumbs.db
diff --git a/.gradle/4.4/fileChanges/last-build.bin b/.gradle/4.4/fileChanges/last-build.bin
deleted file mode 100644
index f76dd23..0000000
Binary files a/.gradle/4.4/fileChanges/last-build.bin and /dev/null differ
diff --git a/.gradle/4.4/fileContent/fileContent.lock b/.gradle/4.4/fileContent/fileContent.lock
deleted file mode 100644
index 64f013d..0000000
Binary files a/.gradle/4.4/fileContent/fileContent.lock and /dev/null differ
diff --git a/.gradle/4.4/fileHashes/fileHashes.bin b/.gradle/4.4/fileHashes/fileHashes.bin
deleted file mode 100644
index 127c738..0000000
Binary files a/.gradle/4.4/fileHashes/fileHashes.bin and /dev/null differ
diff --git a/.gradle/4.4/fileHashes/fileHashes.lock b/.gradle/4.4/fileHashes/fileHashes.lock
deleted file mode 100644
index 38cabc2..0000000
Binary files a/.gradle/4.4/fileHashes/fileHashes.lock and /dev/null differ
diff --git a/.gradle/4.4/fileHashes/resourceHashesCache.bin b/.gradle/4.4/fileHashes/resourceHashesCache.bin
deleted file mode 100644
index a16266c..0000000
Binary files a/.gradle/4.4/fileHashes/resourceHashesCache.bin and /dev/null differ
diff --git a/.gradle/4.4/javaCompile/classAnalysis.bin b/.gradle/4.4/javaCompile/classAnalysis.bin
deleted file mode 100644
index 7411b91..0000000
Binary files a/.gradle/4.4/javaCompile/classAnalysis.bin and /dev/null differ
diff --git a/.gradle/4.4/javaCompile/jarAnalysis.bin b/.gradle/4.4/javaCompile/jarAnalysis.bin
deleted file mode 100644
index 0dadaa5..0000000
Binary files a/.gradle/4.4/javaCompile/jarAnalysis.bin and /dev/null differ
diff --git a/.gradle/4.4/javaCompile/javaCompile.lock b/.gradle/4.4/javaCompile/javaCompile.lock
deleted file mode 100644
index 93ad116..0000000
Binary files a/.gradle/4.4/javaCompile/javaCompile.lock and /dev/null differ
diff --git a/.gradle/4.4/javaCompile/taskHistory.bin b/.gradle/4.4/javaCompile/taskHistory.bin
deleted file mode 100644
index 814e540..0000000
Binary files a/.gradle/4.4/javaCompile/taskHistory.bin and /dev/null differ
diff --git a/.gradle/4.4/javaCompile/taskJars.bin b/.gradle/4.4/javaCompile/taskJars.bin
deleted file mode 100644
index 2af5443..0000000
Binary files a/.gradle/4.4/javaCompile/taskJars.bin and /dev/null differ
diff --git a/.gradle/4.4/taskHistory/taskHistory.bin b/.gradle/4.4/taskHistory/taskHistory.bin
deleted file mode 100644
index b9b888b..0000000
Binary files a/.gradle/4.4/taskHistory/taskHistory.bin and /dev/null differ
diff --git a/.gradle/4.4/taskHistory/taskHistory.lock b/.gradle/4.4/taskHistory/taskHistory.lock
deleted file mode 100644
index 3b43165..0000000
Binary files a/.gradle/4.4/taskHistory/taskHistory.lock and /dev/null differ
diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock
deleted file mode 100644
index f9bac9d..0000000
Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and /dev/null differ
diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties
deleted file mode 100644
index c79f75e..0000000
--- a/.gradle/buildOutputCleanup/cache.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-#Sat Nov 03 19:05:27 EDT 2018
-gradle.version=4.4
diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin
deleted file mode 100644
index da71f82..0000000
Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and /dev/null differ
diff --git a/.idea/assetWizardSettings.xml b/.idea/assetWizardSettings.xml
deleted file mode 100644
index a6b49e0..0000000
--- a/.idea/assetWizardSettings.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser
deleted file mode 100644
index cef724f..0000000
Binary files a/.idea/caches/build_file_checksums.ser and /dev/null differ
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index 30aa626..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
deleted file mode 100644
index 7ac24c7..0000000
--- a/.idea/gradle.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_core_common_1_1_1_jar.xml b/.idea/libraries/Gradle__android_arch_core_common_1_1_1_jar.xml
deleted file mode 100644
index bf16fff..0000000
--- a/.idea/libraries/Gradle__android_arch_core_common_1_1_1_jar.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_core_runtime_1_1_1.xml b/.idea/libraries/Gradle__android_arch_core_runtime_1_1_1.xml
deleted file mode 100644
index 5173eb5..0000000
--- a/.idea/libraries/Gradle__android_arch_core_runtime_1_1_1.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_1_jar.xml b/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_1_jar.xml
deleted file mode 100644
index 27b1867..0000000
--- a/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_1_jar.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_livedata_1_1_1.xml b/.idea/libraries/Gradle__android_arch_lifecycle_livedata_1_1_1.xml
deleted file mode 100644
index eba9104..0000000
--- a/.idea/libraries/Gradle__android_arch_lifecycle_livedata_1_1_1.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_1.xml b/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_1.xml
deleted file mode 100644
index ad36773..0000000
--- a/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_1.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_1.xml b/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_1.xml
deleted file mode 100644
index 650f214..0000000
--- a/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_1.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_1.xml b/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_1.xml
deleted file mode 100644
index 4790436..0000000
--- a/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_1.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_28_0_0.xml
deleted file mode 100644
index 7e58865..0000000
--- a/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_appcompat_v7_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_appcompat_v7_28_0_0.xml
deleted file mode 100644
index 5eddd5e..0000000
--- a/.idea/libraries/Gradle__com_android_support_appcompat_v7_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_asynclayoutinflater_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_asynclayoutinflater_28_0_0.xml
deleted file mode 100644
index 78a2211..0000000
--- a/.idea/libraries/Gradle__com_android_support_asynclayoutinflater_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_cardview_v7_28_0_0_alpha3.xml b/.idea/libraries/Gradle__com_android_support_cardview_v7_28_0_0_alpha3.xml
deleted file mode 100644
index 9a3fdb0..0000000
--- a/.idea/libraries/Gradle__com_android_support_cardview_v7_28_0_0_alpha3.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_collections_28_0_0_jar.xml b/.idea/libraries/Gradle__com_android_support_collections_28_0_0_jar.xml
deleted file mode 100644
index 80e4d73..0000000
--- a/.idea/libraries/Gradle__com_android_support_collections_28_0_0_jar.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_1_1_3.xml b/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_1_1_3.xml
deleted file mode 100644
index 035d440..0000000
--- a/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_1_1_3.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_solver_1_1_3_jar.xml b/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_solver_1_1_3_jar.xml
deleted file mode 100644
index c0adf88..0000000
--- a/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_solver_1_1_3_jar.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_coordinatorlayout_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_coordinatorlayout_28_0_0.xml
deleted file mode 100644
index 40f34ac..0000000
--- a/.idea/libraries/Gradle__com_android_support_coordinatorlayout_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_cursoradapter_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_cursoradapter_28_0_0.xml
deleted file mode 100644
index 32b60ca..0000000
--- a/.idea/libraries/Gradle__com_android_support_cursoradapter_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_customview_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_customview_28_0_0.xml
deleted file mode 100644
index 6e11cdf..0000000
--- a/.idea/libraries/Gradle__com_android_support_customview_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_design_28_0_0_alpha3.xml b/.idea/libraries/Gradle__com_android_support_design_28_0_0_alpha3.xml
deleted file mode 100644
index c8c4ba8..0000000
--- a/.idea/libraries/Gradle__com_android_support_design_28_0_0_alpha3.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_documentfile_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_documentfile_28_0_0.xml
deleted file mode 100644
index 10be8dd..0000000
--- a/.idea/libraries/Gradle__com_android_support_documentfile_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_drawerlayout_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_drawerlayout_28_0_0.xml
deleted file mode 100644
index 85b4c23..0000000
--- a/.idea/libraries/Gradle__com_android_support_drawerlayout_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_interpolator_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_interpolator_28_0_0.xml
deleted file mode 100644
index 2c64506..0000000
--- a/.idea/libraries/Gradle__com_android_support_interpolator_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_loader_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_loader_28_0_0.xml
deleted file mode 100644
index f413be9..0000000
--- a/.idea/libraries/Gradle__com_android_support_loader_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_localbroadcastmanager_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_localbroadcastmanager_28_0_0.xml
deleted file mode 100644
index c93011b..0000000
--- a/.idea/libraries/Gradle__com_android_support_localbroadcastmanager_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_print_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_print_28_0_0.xml
deleted file mode 100644
index cea0f0d..0000000
--- a/.idea/libraries/Gradle__com_android_support_print_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_recyclerview_v7_28_0_0_alpha3.xml b/.idea/libraries/Gradle__com_android_support_recyclerview_v7_28_0_0_alpha3.xml
deleted file mode 100644
index 7764cb3..0000000
--- a/.idea/libraries/Gradle__com_android_support_recyclerview_v7_28_0_0_alpha3.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_slidingpanelayout_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_slidingpanelayout_28_0_0.xml
deleted file mode 100644
index 5095e98..0000000
--- a/.idea/libraries/Gradle__com_android_support_slidingpanelayout_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_annotations_28_0_0_jar.xml b/.idea/libraries/Gradle__com_android_support_support_annotations_28_0_0_jar.xml
deleted file mode 100644
index 0fdecce..0000000
--- a/.idea/libraries/Gradle__com_android_support_support_annotations_28_0_0_jar.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_compat_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_support_compat_28_0_0.xml
deleted file mode 100644
index 1558246..0000000
--- a/.idea/libraries/Gradle__com_android_support_support_compat_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_core_ui_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_support_core_ui_28_0_0.xml
deleted file mode 100644
index e6a195f..0000000
--- a/.idea/libraries/Gradle__com_android_support_support_core_ui_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_core_utils_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_support_core_utils_28_0_0.xml
deleted file mode 100644
index 33b9075..0000000
--- a/.idea/libraries/Gradle__com_android_support_support_core_utils_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_fragment_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_support_fragment_28_0_0.xml
deleted file mode 100644
index 94d5caf..0000000
--- a/.idea/libraries/Gradle__com_android_support_support_fragment_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_media_compat_25_3_1.xml b/.idea/libraries/Gradle__com_android_support_support_media_compat_25_3_1.xml
deleted file mode 100644
index ef627ad..0000000
--- a/.idea/libraries/Gradle__com_android_support_support_media_compat_25_3_1.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_v4_25_3_1.xml b/.idea/libraries/Gradle__com_android_support_support_v4_25_3_1.xml
deleted file mode 100644
index 0e39164..0000000
--- a/.idea/libraries/Gradle__com_android_support_support_v4_25_3_1.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_vector_drawable_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_support_vector_drawable_28_0_0.xml
deleted file mode 100644
index 763e17a..0000000
--- a/.idea/libraries/Gradle__com_android_support_support_vector_drawable_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_swiperefreshlayout_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_swiperefreshlayout_28_0_0.xml
deleted file mode 100644
index 8b8ffa0..0000000
--- a/.idea/libraries/Gradle__com_android_support_swiperefreshlayout_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_3_0_2.xml b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_3_0_2.xml
deleted file mode 100644
index d00c6c5..0000000
--- a/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_3_0_2.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_3_0_2.xml b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_3_0_2.xml
deleted file mode 100644
index d380027..0000000
--- a/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_3_0_2.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_monitor_1_0_2.xml b/.idea/libraries/Gradle__com_android_support_test_monitor_1_0_2.xml
deleted file mode 100644
index 3420bdf..0000000
--- a/.idea/libraries/Gradle__com_android_support_test_monitor_1_0_2.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_runner_1_0_2.xml b/.idea/libraries/Gradle__com_android_support_test_runner_1_0_2.xml
deleted file mode 100644
index 3ccfb0f..0000000
--- a/.idea/libraries/Gradle__com_android_support_test_runner_1_0_2.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_transition_28_0_0_alpha3.xml b/.idea/libraries/Gradle__com_android_support_transition_28_0_0_alpha3.xml
deleted file mode 100644
index 0e1fb5a..0000000
--- a/.idea/libraries/Gradle__com_android_support_transition_28_0_0_alpha3.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_versionedparcelable_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_versionedparcelable_28_0_0.xml
deleted file mode 100644
index 4212e96..0000000
--- a/.idea/libraries/Gradle__com_android_support_versionedparcelable_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_viewpager_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_viewpager_28_0_0.xml
deleted file mode 100644
index 182da94..0000000
--- a/.idea/libraries/Gradle__com_android_support_viewpager_28_0_0.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_github_barteksc_android_pdf_viewer_2_8_2.xml b/.idea/libraries/Gradle__com_github_barteksc_android_pdf_viewer_2_8_2.xml
deleted file mode 100644
index 2bc17ab..0000000
--- a/.idea/libraries/Gradle__com_github_barteksc_android_pdf_viewer_2_8_2.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_github_barteksc_pdfium_android_1_7_1.xml b/.idea/libraries/Gradle__com_github_barteksc_pdfium_android_1_7_1.xml
deleted file mode 100644
index c56b844..0000000
--- a/.idea/libraries/Gradle__com_github_barteksc_pdfium_android_1_7_1.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ 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
deleted file mode 100644
index 947e251..0000000
--- a/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_5_jar.xml b/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_5_jar.xml
deleted file mode 100644
index bc71380..0000000
--- a/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_5_jar.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ 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
deleted file mode 100644
index 5c4dd4e..0000000
--- a/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ 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
deleted file mode 100644
index f9c9a30..0000000
--- a/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ 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
deleted file mode 100644
index f4f25a8..0000000
--- a/.idea/libraries/Gradle__junit_junit_4_12_jar.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ 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
deleted file mode 100644
index 5855a29..0000000
--- a/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ 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
deleted file mode 100644
index 50cf2b9..0000000
--- a/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ 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
deleted file mode 100644
index a5eaca5..0000000
--- a/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ 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
deleted file mode 100644
index b4dabdc..0000000
--- a/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 99202cc..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 4716a9b..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
deleted file mode 100644
index 7f68460..0000000
--- a/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index 6a9f57b..0000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,3404 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AppTheme
- byt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
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-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Appathon2018.iml b/Appathon2018.iml
deleted file mode 100644
index 25d9ab0..0000000
--- a/Appathon2018.iml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
index 796b96d..a307a61 100644
--- a/app/.gitignore
+++ b/app/.gitignore
@@ -1 +1,37 @@
-/build
+# Built application files
+/*/build/
+
+# Crashlytics configuations
+com_crashlytics_export_strings.xml
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Gradle generated files
+.gradle/
+
+# Signing files
+.signing/
+
+# User-specific configurations
+.idea/libraries/
+.idea/workspace.xml
+.idea/tasks.xml
+.idea/.name
+.idea/compiler.xml
+.idea/copyright/profiles_settings.xml
+.idea/encodings.xml
+.idea/misc.xml
+.idea/modules.xml
+.idea/scopes/scope_settings.xml
+.idea/vcs.xml
+*.iml
+
+# OS-specific files
+.DS_Store
+.DS_Store?
+._*
+.Spotlight-V100
+.Trashes
+ehthumbs.db
+Thumbs.db
\ No newline at end of file
diff --git a/app/app.iml b/app/app.iml
index 5b1caba..35726a3 100644
--- a/app/app.iml
+++ b/app/app.iml
@@ -23,19 +23,20 @@
-
-
+
+
-
+
+
-
+
@@ -85,18 +86,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -108,26 +122,32 @@
+
-
+
+
+
-
+
+
+
+
+
-
-
-
+
+
@@ -137,24 +157,34 @@
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/app/build.gradle b/app/build.gradle
index bb6dc44..3920add 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -21,13 +21,21 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- api 'com.android.support:design:28.0.0-alpha3'
+ api 'com.android.support:design:28.0.0' //took out -alpha3
implementation 'com.google.code.gson:gson:2.8.5'
+ implementation 'com.android.volley:volley:1.0.0'
implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'
+ implementation 'com.android.support:support-vector-drawable:28.0.0'
+
implementation 'com.android.support:appcompat-v7:28.0.0'
+ implementation 'com.android.support:support-v4:28.0.0'
+ implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
- implementation 'com.android.support:support-vector-drawable:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+ implementation 'com.google.firebase:firebase-ml-vision:18.0.1'
+ implementation 'com.google.firebase:firebase-ml-vision-image-label-model:17.0.2' //might not actually need
+ implementation 'com.google.firebase:firebase-ml-common:16.1.4' //might not actually need
}
+apply plugin: 'com.google.gms.google-services'
\ No newline at end of file
diff --git a/app/google-services.json b/app/google-services.json
new file mode 100644
index 0000000..61bdb04
--- /dev/null
+++ b/app/google-services.json
@@ -0,0 +1,42 @@
+{
+ "project_info": {
+ "project_number": "492813064787",
+ "firebase_url": "https://etude-221505.firebaseio.com",
+ "project_id": "etude-221505",
+ "storage_bucket": "etude-221505.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:492813064787:android:3a4d0875ee4e025c",
+ "android_client_info": {
+ "package_name": "com.example.etashguha.etude"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "492813064787-8dbc10ae39pt4ljv6oh6gnn8mjgli6mt.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyCGg1Wv4Y9G_8EwHseBcTtrjNjn6nUoMao"
+ }
+ ],
+ "services": {
+ "analytics_service": {
+ "status": 1
+ },
+ "appinvite_service": {
+ "status": 1,
+ "other_platform_oauth_client": []
+ },
+ "ads_service": {
+ "status": 2
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index ae2bd5e..d66102e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -5,6 +5,7 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/etashguha/etude/Dictionary.java b/app/src/main/java/com/example/etashguha/etude/Dictionary.java
new file mode 100644
index 0000000..47a0cec
--- /dev/null
+++ b/app/src/main/java/com/example/etashguha/etude/Dictionary.java
@@ -0,0 +1,65 @@
+package com.example.etashguha.etude;
+
+import android.app.Activity;
+import android.net.Uri;
+import android.os.Message;
+import android.util.Log;
+
+import com.android.volley.AuthFailureError;
+import com.android.volley.Request;
+import com.android.volley.RequestQueue;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.StringRequest;
+import com.android.volley.toolbox.Volley;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class Dictionary extends Thread {
+
+ Activity currentActivity;
+ Reader.DictionaryHandler handler;
+ String word;
+ public Dictionary(Activity activity, Reader.DictionaryHandler dictionaryHandler, String word){
+ currentActivity = activity;
+ handler = dictionaryHandler;
+ this.word = word;
+ }
+
+ public void run(){
+ RequestQueue requestQueue = Volley.newRequestQueue(currentActivity);
+ String toParse = "https://wordsapiv1.p.mashape.com/words/" + word + "/definitions";
+ String uri = Uri.parse(toParse)
+ .buildUpon()
+ .build().toString();
+
+ StringRequest stringRequest = new StringRequest(
+ Request.Method.GET, uri, new Response.Listener() {
+ @Override
+ public void onResponse(String response) {
+ Message message = new Message();
+ message.obj = response;
+ handler.handleMessage(message);
+ }
+
+ }, new Response.ErrorListener() {
+
+ @Override
+ public void onErrorResponse(VolleyError error) {
+ Log.e("VolleyError", error.toString());
+ }
+
+ }) {
+
+ @Override
+ public Map getHeaders() throws AuthFailureError {
+ Map params = new HashMap<>();
+ params.put("X-Mashape-Key", "BNrk40KgrTmshu76EmLWGokuzqvXp1JgmKbjsnrYxFk7id8pWk");
+ params.put("Accept", "text/plain");
+ return params;
+ }
+ };
+ requestQueue.add(stringRequest);
+ }
+}
diff --git a/app/src/main/java/com/example/etashguha/etude/KDNode.java b/app/src/main/java/com/example/etashguha/etude/KDNode.java
new file mode 100644
index 0000000..0a2656d
--- /dev/null
+++ b/app/src/main/java/com/example/etashguha/etude/KDNode.java
@@ -0,0 +1,88 @@
+package com.example.etashguha.etude;
+
+class KDNode
+{
+ int axis;
+ double[] x;
+ int id;
+ boolean checked;
+ boolean orientation;
+
+ KDNode Parent;
+ KDNode Left;
+ KDNode Right;
+
+ public KDNode(double[] x0, int axis0)
+ {
+ x = new double[2];
+ axis = axis0;
+ for (int k = 0; k < 2; k++)
+ x[k] = x0[k];
+
+ Left = Right = Parent = null;
+ checked = false;
+ id = 0;
+ }
+
+ public KDNode FindParent(double[] x0)
+ {
+ KDNode parent = null;
+ KDNode next = this;
+ int split;
+ while (next != null)
+ {
+ split = next.axis;
+ parent = next;
+ if (x0[split] > next.x[split])
+ next = next.Right;
+ else
+ next = next.Left;
+ }
+ return parent;
+ }
+
+ public KDNode Insert(double[] p)
+ {
+ //x = new double[2];
+ KDNode parent = FindParent(p);
+ if (equal(p, parent.x, 2) == true)
+ return null;
+
+ KDNode newNode = new KDNode(p, parent.axis + 1 < 2 ? parent.axis + 1
+ : 0);
+ newNode.Parent = parent;
+
+ if (p[parent.axis] > parent.x[parent.axis])
+ {
+ parent.Right = newNode;
+ newNode.orientation = true; //
+ } else
+ {
+ parent.Left = newNode;
+ newNode.orientation = false; //
+ }
+
+ return newNode;
+ }
+
+ boolean equal(double[] x1, double[] x2, int dim)
+ {
+ for (int k = 0; k < dim; k++)
+ {
+ if (x1[k] != x2[k])
+ return false;
+ }
+
+ return true;
+ }
+
+ double distance2(double[] x1, double[] x2, int dim)
+ {
+ double S = 0;
+ for (int k = 0; k < dim; k++)
+ S += (x1[k] - x2[k]) * (x1[k] - x2[k]);
+ return S;
+ }
+}
+
+
diff --git a/app/src/main/java/com/example/etashguha/etude/KDTree.java b/app/src/main/java/com/example/etashguha/etude/KDTree.java
new file mode 100644
index 0000000..25a6833
--- /dev/null
+++ b/app/src/main/java/com/example/etashguha/etude/KDTree.java
@@ -0,0 +1,181 @@
+package com.example.etashguha.etude;
+
+class KDTree
+{
+ KDNode Root;
+
+ int TimeStart, TimeFinish;
+ int CounterFreq;
+
+ double d_min;
+ KDNode nearest_neighbour;
+
+ int KD_id;
+
+ int nList;
+
+ KDNode CheckedNodes[];
+ int checked_nodes;
+ KDNode List[];
+
+ double x_min[], x_max[];
+ boolean max_boundary[], min_boundary[];
+ int n_boundary;
+
+ public KDTree(int i)
+ {
+ Root = null;
+ KD_id = 1;
+ nList = 0;
+ List = new KDNode[i];
+ CheckedNodes = new KDNode[i];
+ max_boundary = new boolean[2];
+ min_boundary = new boolean[2];
+ x_min = new double[2];
+ x_max = new double[2];
+ }
+
+ public boolean add(double[] x)
+ {
+ if (nList >= 2000000 - 1)
+ return false; // can't add more points
+
+ if (Root == null)
+ {
+ Root = new KDNode(x, 0);
+ Root.id = KD_id++;
+ List[nList++] = Root;
+ } else
+ {
+ KDNode pNode;
+ if ((pNode = Root.Insert(x)) != null)
+ {
+ pNode.id = KD_id++;
+ List[nList++] = pNode;
+ }
+ }
+
+ return true;
+ }
+
+ public KDNode find_nearest(double[] x)
+ {
+ if (Root == null)
+ return null;
+
+ checked_nodes = 0;
+ KDNode parent = Root.FindParent(x);
+ nearest_neighbour = parent;
+ d_min = Root.distance2(x, parent.x, 2);
+ ;
+
+ if (parent.equal(x, parent.x, 2) == true)
+ return nearest_neighbour;
+
+ search_parent(parent, x);
+ uncheck();
+
+ return nearest_neighbour;
+ }
+
+ public void check_subtree(KDNode node, double[] x)
+ {
+ if ((node == null) || node.checked)
+ return;
+
+ CheckedNodes[checked_nodes++] = node;
+ node.checked = true;
+ set_bounding_cube(node, x);
+
+ int dim = node.axis;
+ double d = node.x[dim] - x[dim];
+
+ if (d * d > d_min)
+ {
+ if (node.x[dim] > x[dim])
+ check_subtree(node.Left, x);
+ else
+ check_subtree(node.Right, x);
+ } else
+ {
+ check_subtree(node.Left, x);
+ check_subtree(node.Right, x);
+ }
+ }
+
+ public void set_bounding_cube(KDNode node, double[] x)
+ {
+ if (node == null)
+ return;
+ int d = 0;
+ double dx;
+ for (int k = 0; k < 2; k++)
+ {
+ dx = node.x[k] - x[k];
+ if (dx > 0)
+ {
+ dx *= dx;
+ if (!max_boundary[k])
+ {
+ if (dx > x_max[k])
+ x_max[k] = dx;
+ if (x_max[k] > d_min)
+ {
+ max_boundary[k] = true;
+ n_boundary++;
+ }
+ }
+ } else
+ {
+ dx *= dx;
+ if (!min_boundary[k])
+ {
+ if (dx > x_min[k])
+ x_min[k] = dx;
+ if (x_min[k] > d_min)
+ {
+ min_boundary[k] = true;
+ n_boundary++;
+ }
+ }
+ }
+ d += dx;
+ if (d > d_min)
+ return;
+
+ }
+
+ if (d < d_min)
+ {
+ d_min = d;
+ nearest_neighbour = node;
+ }
+ }
+
+ public KDNode search_parent(KDNode parent, double[] x)
+ {
+ for (int k = 0; k < 2; k++)
+ {
+ x_min[k] = x_max[k] = 0;
+ max_boundary[k] = min_boundary[k] = false; //
+ }
+ n_boundary = 0;
+
+ KDNode search_root = parent;
+ while (parent != null && (n_boundary != 2 * 2))
+ {
+ check_subtree(parent, x);
+ search_root = parent;
+ parent = parent.Parent;
+ }
+
+ return search_root;
+ }
+
+ public void uncheck()
+ {
+ for (int n = 0; n < checked_nodes; n++)
+ CheckedNodes[n].checked = false;
+ }
+
+}
diff --git a/app/src/main/java/com/example/etashguha/etude/MainActivity.java b/app/src/main/java/com/example/etashguha/etude/MainActivity.java
index b66b931..7049177 100644
--- a/app/src/main/java/com/example/etashguha/etude/MainActivity.java
+++ b/app/src/main/java/com/example/etashguha/etude/MainActivity.java
@@ -9,12 +9,20 @@
public class MainActivity extends AppCompatActivity {
MaterialButton button;
+ MaterialButton cancel;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
button = findViewById(R.id.next_button);
+ cancel = findViewById(R.id.cancel_button);
+ cancel.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+
+ }
+ });
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -23,4 +31,6 @@ public void onClick(View v) {
}
});
}
+
+
}
diff --git a/app/src/main/java/com/example/etashguha/etude/MapScreen.java b/app/src/main/java/com/example/etashguha/etude/MapScreen.java
new file mode 100644
index 0000000..2878714
--- /dev/null
+++ b/app/src/main/java/com/example/etashguha/etude/MapScreen.java
@@ -0,0 +1,59 @@
+package com.example.etashguha.etude;
+
+import android.os.Message;
+
+import com.google.firebase.ml.vision.document.FirebaseVisionDocumentText;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+public class MapScreen extends Thread {
+
+ FirebaseVisionDocumentText text;
+ Reader.CoordinatesHandler coordinatesHandler;
+ Reader.CoordinatesToWordHandler coordinatesToWordHandler;
+ int pageNumber;
+
+ public MapScreen(FirebaseVisionDocumentText text, Reader.CoordinatesHandler coordinatesHandler, Reader.CoordinatesToWordHandler coordinatesToWordHandler, int pageNumber){
+ this.text = text;
+ this.coordinatesHandler = coordinatesHandler;
+ this.coordinatesToWordHandler = coordinatesToWordHandler;
+ this.pageNumber = pageNumber;
+ }
+
+ @Override
+ public void run() {
+ Message coordinatesMsg = new Message();
+ Message coordinatesToWordMsg = new Message();
+ ArrayList words = new ArrayList<>();
+ ArrayList xValues = new ArrayList<>();
+ ArrayList yValues = new ArrayList<>();
+ List blocks = text.getBlocks();
+ for(int blockIndex = 0; blockIndex < blocks.size(); blockIndex++){
+ for(int paragraphIndex = 0; paragraphIndex < blocks.get(blockIndex).getParagraphs().size(); paragraphIndex++){
+ for(int wordIndex = 0; wordIndex < blocks.get(blockIndex).getParagraphs().get(paragraphIndex).getWords().size(); wordIndex++){
+ xValues.add(blocks.get(blockIndex).getParagraphs().get(paragraphIndex).getWords().get(wordIndex).getBoundingBox().centerX());
+ yValues.add(blocks.get(blockIndex).getParagraphs().get(paragraphIndex).getWords().get(wordIndex).getBoundingBox().centerY());
+ words.add(blocks.get(blockIndex).getParagraphs().get(paragraphIndex).getWords().get(wordIndex));
+ }
+ }
+ }
+
+ HashMap coordinatesToWord = new HashMap<>();
+ KDTree coordinates = new KDTree(words.size());
+ for(int i = 0; i < words.size(); i++){
+ double [] coordinate = new double[2];
+ coordinate[0] = xValues.get(i);
+ coordinate[1] = yValues.get(i);
+ String key = xValues.get(i) + " " + yValues.get(i);
+ coordinatesToWord.put(key, words.get(i).getText());
+ coordinates.add(coordinate);
+ }
+
+ coordinatesMsg.obj = coordinates;
+ coordinatesHandler.sendMessage(coordinatesMsg);
+ coordinatesToWordMsg.obj = coordinatesToWord;
+ coordinatesToWordHandler.sendMessage(coordinatesToWordMsg);
+ }
+}
diff --git a/app/src/main/java/com/example/etashguha/etude/OCR.java b/app/src/main/java/com/example/etashguha/etude/OCR.java
index b683f3d..3a0322f 100644
--- a/app/src/main/java/com/example/etashguha/etude/OCR.java
+++ b/app/src/main/java/com/example/etashguha/etude/OCR.java
@@ -1,110 +1,59 @@
package com.example.etashguha.etude;
+import android.graphics.Bitmap;
import android.os.Message;
-import android.os.StrictMode;
+import android.support.annotation.NonNull;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
+import com.google.android.gms.tasks.OnFailureListener;
+import com.google.android.gms.tasks.OnSuccessListener;
+import com.google.firebase.ml.vision.FirebaseVision;
+import com.google.firebase.ml.vision.common.FirebaseVisionImage;
+import com.google.firebase.ml.vision.document.FirebaseVisionDocumentText;
+import com.google.firebase.ml.vision.document.FirebaseVisionDocumentTextRecognizer;
-import java.io.BufferedReader;
-import java.io.DataOutputStream;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-import static android.os.StrictMode.setThreadPolicy;
public class OCR extends Thread{
- public static String API_KEY = "AIzaSyAKtutaW6bmH036oB1t8ViQagm_-OItNLc";
- public static String targetURL = "https://vision.googleapis.com/v1/images:annotate?key=" + API_KEY;
public static Reader.OCRHandler ocrHandler;
- String encodedImage;
+ Bitmap encodedImage;
int pageNumber;
- public OCR(Reader.OCRHandler ocrHandler, String encodedImage, int pageNumber){
+ public OCR(Reader.OCRHandler ocrHandler, Bitmap encodedImage, int pageNumber){
super();
OCR.ocrHandler = ocrHandler;
this.encodedImage = encodedImage;
this.pageNumber = pageNumber;
}
- @Override
- public void run(){
- Message msg = new Message();
- msg.what = pageNumber;
- StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
- setThreadPolicy(policy);
- String body = "{\n" +
- " \"requests\":[\n" +
- " {\n" +
- " \"image\":{\n" +
- " \"content\":\""+encodedImage+"\""+"\n" +
- " },\n" +
- " \"features\":[\n" +
- " {\n" +
- " \"type\":\"DOCUMENT_TEXT_DETECTION\",\n" +
- " \"maxResults\":4\n" +
- " }\n" +
- " ]\n" +
- " }\n" +
- " ]\n" +
- "}";
- HttpURLConnection connection = null;
- try {
- URL url = new URL(targetURL);
- connection = (HttpURLConnection) url.openConnection();
- connection.setRequestMethod("POST");
- connection.setRequestProperty("Content-Type", "application/json");
- connection.setRequestProperty("Content-Length", Integer.toString(body.getBytes().length));
-
- connection.setUseCaches(false);
- connection.setDoOutput(true);
-
- DataOutputStream wr = new DataOutputStream(
- connection.getOutputStream());
- wr.writeBytes(body);
- wr.close();
-
-
- //getting response
-
- InputStream is = connection.getInputStream();
- BufferedReader rd = new BufferedReader(new InputStreamReader(is));
- StringBuilder response = new StringBuilder(); // or StringBuffer if Java version 5+
- String line;
- while ((line = rd.readLine()) != null) {
- response.append(line);
- response.append('\n');
+ private void detectTextFire() {
+ FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(encodedImage);
+ FirebaseVisionDocumentTextRecognizer textRecognizer = FirebaseVision.getInstance().getCloudDocumentTextRecognizer();
+ textRecognizer.processImage(image).addOnSuccessListener(new OnSuccessListener() {
+ @Override
+ public void onSuccess(FirebaseVisionDocumentText firebaseVisionDocumentText) {
+ processText(firebaseVisionDocumentText); //dont worry about rest of this method. if it succeeds, it will call this method
}
- rd.close();
-
- JsonElement jelement = new JsonParser().parse(response.toString());
- JsonObject jsonObject = jelement.getAsJsonObject();
- JsonArray jarray = jsonObject.getAsJsonArray("responses");
- JsonObject jsonObjectTwo = jarray.get(0).getAsJsonObject();
- JsonArray jsonArrayTwo = jsonObjectTwo.getAsJsonArray("textAnnotations");
- JsonObject jsonObjectThree = jsonArrayTwo.get(0).getAsJsonObject();
- String result = jsonObjectThree.get("description").getAsString();
- // decode json
- // decode base64
- // output is a wave file
- msg.obj = result;
- ocrHandler.sendMessage(msg);
+ })
+ .addOnFailureListener(
+ new OnFailureListener() {
+ @Override
+ public void onFailure(@NonNull Exception e) {
+ // Task failed with an exception
+ e.printStackTrace();
+ }
+ });
+ }
- } catch (Exception e) {
- e.printStackTrace();
- msg.obj = "fail";
- ocrHandler.sendMessage(msg);
+ private void processText(FirebaseVisionDocumentText text) {
+ Message msg = new Message();
+ msg.what = pageNumber;
- } finally {
- if (connection != null) {
- connection.disconnect();
- return;
- }
- }
+ msg.obj = text;
+ ocrHandler.sendMessage(msg);
}
+ @Override
+ public void run(){
+ detectTextFire(); //this method currently uses the document online feature, not local text recognition
+ }
+
}
diff --git a/app/src/main/java/com/example/etashguha/etude/Reader.java b/app/src/main/java/com/example/etashguha/etude/Reader.java
index 9456a03..8aa7b56 100644
--- a/app/src/main/java/com/example/etashguha/etude/Reader.java
+++ b/app/src/main/java/com/example/etashguha/etude/Reader.java
@@ -1,50 +1,127 @@
package com.example.etashguha.etude;
+import android.annotation.SuppressLint;
import android.app.Activity;
+import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.StrictMode;
import android.support.annotation.NonNull;
+import android.support.constraint.ConstraintLayout;
import android.support.design.widget.BottomNavigationView;
+import android.support.design.widget.FloatingActionButton;
+import android.support.design.widget.BottomSheetBehavior;
+import android.support.design.widget.CoordinatorLayout;
import android.support.v7.app.AppCompatActivity;
+import android.util.Log;
import android.view.MenuItem;
+import android.view.MotionEvent;
import android.view.View;
import android.widget.ProgressBar;
+import android.widget.TextView;
import com.github.barteksc.pdfviewer.PDFView;
+import com.google.firebase.ml.vision.document.FirebaseVisionDocumentText;
+import java.util.HashMap;
public class Reader extends AppCompatActivity {
+ double x,y;
+ boolean coordinatesUpdated, coordinatesToWordUpdated, firstTimePlaying, timeToDefine, isDefining, isPlaying;
+ public HashMap coordinatesToWord;
+ public KDTree coordinates;
PDFView pdfView;
PausePlay pausePlayState = PausePlay.PAUSED;
- int pageNumber = 0;
Screenshot screenshot;
- boolean firstTimePlaying;
Reader.SSHandler ssHandler;
+ int pageNumber;
+ DictionaryHandler dictionaryHandler;
Player player;
BottomNavigationView bottomNavigationView;
ProgressBar progBar;
+ FloatingActionButton defineWord;
Activity baseActivity;
+ TextView definition;
+ ConstraintLayout baseLayout;
+ BottomSheetBehavior behavior;
+ CoordinatorLayout coordinatorLayout;
+ View bottomSheet;
+ @SuppressLint("ClickableViewAccessibility")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.reader);
+
+ pageNumber = 0;
baseActivity = this;
+ coordinatesUpdated = false;
+ coordinatesToWordUpdated = false;
+ timeToDefine = false;
player = new Player("");
- final Uri uri = getIntent().getData();
+ isDefining = false;
+ isPlaying = false;
+
pdfView = findViewById(R.id.pdfView);
+ defineWord = findViewById(R.id.defineButton);
progBar = findViewById(R.id.progressBar);
+ definition = findViewById(R.id.definition);
progBar.setVisibility(View.INVISIBLE);
+ coordinatorLayout = findViewById(R.id.main_content);
+ bottomSheet = coordinatorLayout.findViewById(R.id.bottom_sheet);
+ baseLayout = findViewById(R.id.container);
+
+ baseActivity = this;
+ player = new Player("");
firstTimePlaying = true;
+
+ final Uri uri = getIntent().getData();
+
+ dictionaryHandler = new DictionaryHandler();
+ pausePlayState = PausePlay.PAUSED;
+
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
+ behavior = BottomSheetBehavior.from(bottomSheet);
+ behavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
+ @Override
+ public void onStateChanged(@NonNull View bottomSheet, int newState) {
+ // React to state change
+ Log.e("onStateChanged", "onStateChanged:" + newState);
+ }
+ @Override
+ public void onSlide(@NonNull View bottomSheet, float slideOffset) {
+ // React to dragging events
+ Log.e("onSlide", "onSlide");
+ }
+ });
+
+ baseLayout.setOnTouchListener(new View.OnTouchListener() {
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ Log.d("coordinates", event.getX() + " " + event.getY());
+ return false;
+ }
+ });
+
+ behavior.setPeekHeight(0);
+ behavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
+
pdfView.fromUri(uri).pages(pageNumber).load();
+
+ defineWord.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ timeToDefine = true;
+ }
+ });
+
+ dictionaryHandler = new DictionaryHandler();
bottomNavigationView = findViewById(R.id.bottomNavigation);
bottomNavigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
@Override
@@ -64,9 +141,10 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
item.setIcon(R.drawable.pause_image);
firstTimePlaying = false;
pausePlayState = PausePlay.PLAYING;
- ssHandler = new SSHandler();
+ ssHandler = new SSHandler(Purpose.PLAY);
screenshot = new Screenshot(baseActivity, ssHandler, pageNumber);
screenshot.run();
+ isPlaying = true;
} else if(pausePlayState == PausePlay.PLAYING) {
item.setIcon(R.drawable.playbutton);
pausePlayState = PausePlay.PAUSED;
@@ -85,6 +163,22 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
return false;
}
});
+
+ }
+
+ @Override
+ public boolean dispatchTouchEvent(MotionEvent ev) {
+ if(ev.getRawY() < bottomNavigationView.getY() && timeToDefine && (ev.getRawY() < defineWord.getY() || ev.getRawX() < defineWord.getX())){
+ isDefining = true;
+ timeToDefine = false;
+ progBar.setVisibility(View.VISIBLE);
+ y = ev.getRawY() - getStatusBarHeight();
+ x = ev.getRawX();
+ ssHandler = new SSHandler(Purpose.DEFINE);
+ screenshot = new Screenshot(baseActivity, ssHandler, pageNumber);
+ screenshot.run();
+ }
+ return super.dispatchTouchEvent(ev);
}
public void sideButtonReset(){
@@ -93,6 +187,7 @@ public void sideButtonReset(){
firstTimePlaying = true;
pausePlayState = PausePlay.PAUSED;
progBar.setVisibility(View.INVISIBLE);
+ isPlaying = false;
bottomNavigationView.getMenu().findItem(R.id.play_pause_button).setEnabled(true);
}
@@ -100,8 +195,12 @@ public enum PausePlay{
PAUSED, PLAYING
}
- public void createPlayer(String readyForMediaPlayer){
- player = new Player(readyForMediaPlayer);
+ public enum Purpose{
+ DEFINE, PLAY;
+ }
+
+ public void createPlayer(String outputString){
+ player = new Player(outputString);
player.startSpeaking();
}
@@ -109,36 +208,67 @@ public class SSHandler extends Handler {
Reader.OCRHandler ocrHandler;
OCR ocr;
-
- public SSHandler(){
+ public SSHandler(Purpose purpose){
super();
- ocrHandler = new Reader.OCRHandler();
+ ocrHandler = new Reader.OCRHandler(purpose);
}
@Override
public void handleMessage(Message msg){
if(msg.what == pageNumber) {
- ocr = new OCR(ocrHandler, (String) msg.obj, msg.what);
+ ocr = new OCR(ocrHandler, (Bitmap) msg.obj, msg.what);
ocr.start();
}
}
}
- public class OCRHandler extends Handler{
+ public class OCRHandler extends Handler {
- TTS tts;
- Reader.TTSHandler ttsHandler;
+ ReadyTTSHandler readyTTSHandler;
+ CoordinatesHandler coordinatesHandler;
+ CoordinatesToWordHandler coordinatesToWordHandler;
+ Purpose purpose;
- public OCRHandler() {
+ public OCRHandler(Purpose purpose) {
super();
- ttsHandler = new Reader.TTSHandler();
+ this.purpose = purpose;
+ readyTTSHandler = new ReadyTTSHandler();
+ coordinatesHandler = new CoordinatesHandler();
+ coordinatesToWordHandler = new CoordinatesToWordHandler();
}
@Override
public void handleMessage(Message msg) {
- if(msg.what == pageNumber) {
- String ocrOutput = (String) msg.obj;
- tts = new TTS(ttsHandler, ocrOutput, msg.what);
+ if (msg.what == pageNumber) {
+ switch (purpose) {
+ case PLAY:
+ ReadyTTS readyTTS = new ReadyTTS((FirebaseVisionDocumentText) msg.obj, readyTTSHandler, msg.what);
+ readyTTS.start();
+ break;
+ case DEFINE:
+ MapScreen mapScreen = new MapScreen((FirebaseVisionDocumentText) msg.obj, coordinatesHandler, coordinatesToWordHandler, msg.what);
+ mapScreen.start();
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+
+ public class ReadyTTSHandler extends Handler{
+
+ TTSHandler ttsHandler;
+
+ public ReadyTTSHandler(){
+ super();
+ ttsHandler = new TTSHandler();
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ if(msg.what == pageNumber){
+ TTS tts = new TTS(ttsHandler, (String)msg.obj, msg.what);
tts.start();
}
}
@@ -153,10 +283,91 @@ public TTSHandler(){
@Override
public void handleMessage(Message msg){
if(msg.what == pageNumber) {
- progBar.setVisibility(View.INVISIBLE);
+ isPlaying = false;
+ if(!isDefining) {
+ progBar.setVisibility(View.INVISIBLE);
+ }
bottomNavigationView.getMenu().findItem(R.id.play_pause_button).setEnabled(true);
- createPlayer((String) msg.obj);
+ createPlayer((String)msg.obj);
}
}
}
+
+
+ public class CoordinatesToWordHandler extends Handler {
+
+ public CoordinatesToWordHandler() {
+ super();
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ coordinatesToWord = (HashMap) (msg.obj);
+ coordinatesToWordUpdated = true;
+
+ if (coordinatesUpdated && coordinatesToWordUpdated) {
+ findWord();
+ if(!isPlaying) {
+ progBar.setVisibility(View.INVISIBLE);
+ }
+ isDefining = false;
+ }
+ }
+ }
+
+
+ public class CoordinatesHandler extends Handler{
+
+ public CoordinatesHandler(){
+ super();
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ coordinates = (KDTree)msg.obj;
+ coordinatesUpdated = true;
+
+ if (coordinatesUpdated && coordinatesToWordUpdated) {
+ findWord();
+ }
+ }
+ }
+
+ public void findWord(){
+ KDNode nearest = coordinates.find_nearest(new double[]{x, y});
+ String key = (int) nearest.x[0] + " " + (int) nearest.x[1];
+ Dictionary dictionary = new Dictionary(baseActivity, dictionaryHandler,coordinatesToWord.get(key));
+ dictionary.start();
+ }
+
+ public int getStatusBarHeight() {
+ int result = 0;
+ int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
+ if (resourceId > 0) {
+ result = getResources().getDimensionPixelSize(resourceId);
+ }
+ return result;
+ }
+
+ public class DictionaryHandler extends Handler{
+
+ public DictionaryHandler() {
+ super();
+ }
+ @SuppressLint("SetTextI18n")
+ @Override
+ public void handleMessage(Message msg) {
+ String response = (String)msg.obj;
+ String word = response.substring(response.indexOf("\"word\":\"") + 8 , response.indexOf("\"definition\":\"") - 18);
+ String definitionString = response.substring(response.indexOf("\"definition\":\"") + 14, response.indexOf("\",\"partOfSpeech"));
+ definition.setText(capitalize(word) + " - " + definitionString);
+
+ behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
+ }
+ }
+
+ public String capitalize(String str){
+ String cap = str.substring(0, 1).toUpperCase() + str.substring(1);
+ return cap;
+ }
}
diff --git a/app/src/main/java/com/example/etashguha/etude/ReadyTTS.java b/app/src/main/java/com/example/etashguha/etude/ReadyTTS.java
new file mode 100644
index 0000000..5b7c9b3
--- /dev/null
+++ b/app/src/main/java/com/example/etashguha/etude/ReadyTTS.java
@@ -0,0 +1,38 @@
+package com.example.etashguha.etude;
+
+
+import android.os.Message;
+
+import com.google.firebase.ml.vision.document.FirebaseVisionDocumentText;
+
+import java.util.List;
+
+public class ReadyTTS extends Thread {
+
+ FirebaseVisionDocumentText text;
+ Reader.ReadyTTSHandler readyTTSHandler;
+ int pageNumber;
+
+ public ReadyTTS(FirebaseVisionDocumentText text, Reader.ReadyTTSHandler readyTTSHandler, int pageNumber){
+ this.text = text;
+ this.readyTTSHandler = readyTTSHandler;
+ this.pageNumber = pageNumber;
+ }
+
+ @Override
+ public void run() {
+ Message msg = new Message();
+ List blocks = text.getBlocks();
+ int maxHeight = 0;
+ FirebaseVisionDocumentText.Block maxBlock = null;
+ for(FirebaseVisionDocumentText.Block block: blocks) {
+ if (block.getBoundingBox().height() > maxHeight) {
+ maxBlock = block;
+ maxHeight = block.getBoundingBox().height();
+ }
+ }
+ msg.obj = maxBlock.getText();
+ msg.what = pageNumber;
+ readyTTSHandler.sendMessage(msg);
+ }
+}
diff --git a/app/src/main/java/com/example/etashguha/etude/Screenshot.java b/app/src/main/java/com/example/etashguha/etude/Screenshot.java
index b480e90..f032639 100644
--- a/app/src/main/java/com/example/etashguha/etude/Screenshot.java
+++ b/app/src/main/java/com/example/etashguha/etude/Screenshot.java
@@ -2,6 +2,9 @@
import android.app.Activity;
import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
import android.graphics.Rect;
import android.os.Message;
import android.util.Base64;
@@ -33,26 +36,32 @@ private static Bitmap takeScreenShot(Activity activity) {
//Find the screen dimensions to create bitmap in the same size.
int width = activity.getWindowManager().getDefaultDisplay().getWidth();
int height = activity.getWindowManager().getDefaultDisplay().getHeight();
-
Bitmap b = Bitmap.createBitmap(b1, 0, statusBarHeight, width, height - statusBarHeight);
view.destroyDrawingCache();
return b;
}
-
- private String bitmapToString(Bitmap bitmap){
- ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
- bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
- byte[] byteArray = byteArrayOutputStream .toByteArray();
- String encoded = Base64.encodeToString(byteArray, Base64.DEFAULT);
- return encoded;
- }
+// private String bitmapToString(Bitmap bitmap){
+// ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+// bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
+// byte[] byteArray = byteArrayOutputStream .toByteArray();
+// String encoded = Base64.encodeToString(byteArray, Base64.DEFAULT);
+// return encoded;
+// }
+//
+// private byte[] bitmapToByteArray (Bitmap bitmap) {
+// ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+// bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
+// byte[] byteArray = byteArrayOutputStream .toByteArray();
+// return byteArray;
+// }
@Override
public void run(){
msg = new Message();
- msg.obj = bitmapToString(takeScreenShot(activity));
+ Bitmap b = takeScreenShot(activity);
+ msg.obj = b;
msg.what = pageNumber;
- ssHandler.sendMessage(msg);
+ ssHandler.sendMessage(msg); //passes the bitmap to the reader
return;
}
}
diff --git a/app/src/main/res/layout/reader.xml b/app/src/main/res/layout/reader.xml
index 138a966..68dd2c7 100644
--- a/app/src/main/res/layout/reader.xml
+++ b/app/src/main/res/layout/reader.xml
@@ -4,16 +4,18 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
+ android:clickable="true"
+ android:focusable="true"
+ android:focusableInTouchMode="true"
android:layout_height="match_parent"
tools:context=".Reader">
-
+ tools:layout_editor_absoluteY="495dp">
+
+
-
+ tools:layout_editor_absoluteX="0dp">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 43c0708..6d99285 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,22 +3,26 @@
buildscript {
repositories {
+ mavenLocal()
google()
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.1.3'
-
+ classpath 'com.android.tools.build:gradle:3.2.1'
+ classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
+
}
allprojects {
repositories {
+ mavenLocal()
google()
jcenter()
+
}
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 1f8f644..9b9791c 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sat Nov 03 18:57:52 EDT 2018
+#Wed Nov 21 11:42:05 EST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
diff --git a/local.properties b/local.properties
deleted file mode 100644
index 1624861..0000000
--- a/local.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-## This file is automatically generated by Android Studio.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file should *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.
-sdk.dir=/Users/etashguha/Library/Android/sdk
\ No newline at end of file