├── .gitignore ├── .idea ├── .gitignore ├── caches │ └── build_file_checksums.ser ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── encodings.xml ├── gradle.xml ├── libraries │ ├── Gradle__androidx_activity_activity_1_1_0_aar.xml │ ├── Gradle__androidx_activity_activity_ktx_1_1_0_aar.xml │ ├── Gradle__androidx_annotation_annotation_1_1_0_jar.xml │ ├── Gradle__androidx_annotation_annotation_experimental_1_0_0_aar.xml │ ├── Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml │ ├── Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml │ ├── Gradle__androidx_arch_core_core_common_2_1_0_jar.xml │ ├── Gradle__androidx_arch_core_core_runtime_2_1_0_aar.xml │ ├── Gradle__androidx_cardview_cardview_1_0_0_aar.xml │ ├── Gradle__androidx_collection_collection_1_1_0_jar.xml │ ├── Gradle__androidx_collection_collection_ktx_1_1_0_jar.xml │ ├── Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml │ ├── Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml │ ├── Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml │ ├── Gradle__androidx_core_core_1_2_0_aar.xml │ ├── Gradle__androidx_core_core_ktx_1_2_0_aar.xml │ ├── Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml │ ├── Gradle__androidx_customview_customview_1_0_0_aar.xml │ ├── Gradle__androidx_databinding_databinding_adapters_3_6_3_aar.xml │ ├── Gradle__androidx_databinding_databinding_common_3_6_3_jar.xml │ ├── Gradle__androidx_databinding_databinding_runtime_3_6_3_aar.xml │ ├── Gradle__androidx_databinding_viewbinding_3_6_3_aar.xml │ ├── Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml │ ├── Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml │ ├── Gradle__androidx_exifinterface_exifinterface_1_0_0_aar.xml │ ├── Gradle__androidx_fragment_fragment_1_2_4_aar.xml │ ├── Gradle__androidx_fragment_fragment_ktx_1_2_4_aar.xml │ ├── Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml │ ├── Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_common_2_2_0_jar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_extensions_2_2_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_2_2_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_core_2_2_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_core_ktx_2_2_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_process_2_2_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_runtime_2_2_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_runtime_ktx_2_2_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_service_2_2_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_2_2_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_ktx_2_2_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_savedstate_2_2_0_aar.xml │ ├── Gradle__androidx_loader_loader_1_0_0_aar.xml │ ├── Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml │ ├── Gradle__androidx_multidex_multidex_2_0_1_aar.xml │ ├── Gradle__androidx_navigation_navigation_common_2_2_2_aar.xml │ ├── Gradle__androidx_navigation_navigation_common_ktx_2_2_2_aar.xml │ ├── Gradle__androidx_navigation_navigation_fragment_2_2_2_aar.xml │ ├── Gradle__androidx_navigation_navigation_fragment_ktx_2_2_2_aar.xml │ ├── Gradle__androidx_navigation_navigation_runtime_2_2_2_aar.xml │ ├── Gradle__androidx_navigation_navigation_runtime_ktx_2_2_2_aar.xml │ ├── Gradle__androidx_navigation_navigation_ui_2_2_2_aar.xml │ ├── Gradle__androidx_navigation_navigation_ui_ktx_2_2_2_aar.xml │ ├── Gradle__androidx_print_print_1_0_0_aar.xml │ ├── Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml │ ├── Gradle__androidx_room_room_common_2_2_5_jar.xml │ ├── Gradle__androidx_room_room_runtime_2_2_5_aar.xml │ ├── Gradle__androidx_room_room_rxjava2_2_2_5_aar.xml │ ├── Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml │ ├── Gradle__androidx_sqlite_sqlite_2_0_1_aar.xml │ ├── Gradle__androidx_sqlite_sqlite_framework_2_0_1_aar.xml │ ├── Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml │ ├── Gradle__androidx_test_core_1_2_0_aar.xml │ ├── Gradle__androidx_test_espresso_espresso_core_3_2_0_aar.xml │ ├── Gradle__androidx_test_espresso_espresso_idling_resource_3_2_0_aar.xml │ ├── Gradle__androidx_test_ext_junit_1_1_1_aar.xml │ ├── Gradle__androidx_test_monitor_1_2_0_aar.xml │ ├── Gradle__androidx_test_runner_1_2_0_aar.xml │ ├── Gradle__androidx_transition_transition_1_2_0_aar.xml │ ├── Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml │ ├── Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml │ ├── Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml │ ├── Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml │ ├── Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml │ ├── Gradle__com_google_android_material_material_1_2_0_alpha06_aar.xml │ ├── Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml │ ├── Gradle__com_google_code_gson_gson_2_8_6_jar.xml │ ├── Gradle__com_squareup_javawriter_2_1_1_jar.xml │ ├── Gradle__com_squareup_okhttp3_okhttp_3_10_0_jar.xml │ ├── Gradle__com_squareup_okio_okio_1_14_0_jar.xml │ ├── Gradle__com_squareup_picasso_picasso_2_71828_aar.xml │ ├── Gradle__io_reactivex_rxjava2_rxandroid_2_1_1_aar.xml │ ├── Gradle__io_reactivex_rxjava2_rxjava_2_2_18_jar.xml │ ├── Gradle__javax_inject_javax_inject_1_jar.xml │ ├── Gradle__junit_junit_4_12_jar.xml │ ├── Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml │ ├── Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml │ ├── Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml │ ├── Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml │ ├── Gradle__org_jetbrains_annotations_13_0_jar.xml │ ├── Gradle__org_jetbrains_kotlin_kotlin_android_extensions_runtime_1_3_61_jar.xml │ ├── Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_3_61_jar.xml │ ├── Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_3_61_jar.xml │ ├── Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_3_61_jar.xml │ ├── Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_android_1_3_0_jar.xml │ ├── Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_core_1_3_0_jar.xml │ ├── Gradle__org_koin_koin_android_2_0_1_aar.xml │ ├── Gradle__org_koin_koin_androidx_scope_2_0_1_aar.xml │ ├── Gradle__org_koin_koin_androidx_viewmodel_2_0_1_aar.xml │ ├── Gradle__org_koin_koin_core_2_0_1_jar.xml │ └── Gradle__org_reactivestreams_reactive_streams_1_0_3_jar.xml ├── misc.xml ├── modules.xml └── runConfigurations.xml ├── README.md ├── WhatsAppDeletedMessageRecovery.iml ├── app ├── WhatsAppDeletedMessageRecovery-app.iml ├── app.iml ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── bot │ │ └── box │ │ └── whatsdelete │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── bot │ │ │ └── box │ │ │ └── whatsdelete │ │ │ ├── MainApplication.kt │ │ │ ├── data │ │ │ ├── database │ │ │ │ ├── ChatRoomDB.kt │ │ │ │ ├── dao │ │ │ │ │ └── ChatDao.kt │ │ │ │ ├── entity │ │ │ │ │ ├── Chat.kt │ │ │ │ │ ├── ChatRoom.kt │ │ │ │ │ └── Conversation.kt │ │ │ │ └── typeconverters │ │ │ │ │ ├── ChatConverter.kt │ │ │ │ │ └── ConversationConverter.kt │ │ │ ├── preference │ │ │ │ ├── IPreference.kt │ │ │ │ └── PreferenceImpl.kt │ │ │ └── repository │ │ │ │ ├── IRepository.kt │ │ │ │ └── RepositoryImpl.kt │ │ │ ├── di │ │ │ └── KoinModule.kt │ │ │ ├── ui │ │ │ ├── activity │ │ │ │ ├── HomeActivity.kt │ │ │ │ ├── SettingActivity.kt │ │ │ │ └── SplashActivity.kt │ │ │ ├── adapter │ │ │ │ └── ChatRoomAdapter.kt │ │ │ ├── base │ │ │ │ ├── BaseActivity.kt │ │ │ │ ├── BaseFragment.kt │ │ │ │ └── BaseViewModel.kt │ │ │ ├── fragment │ │ │ │ ├── ChatFragment.kt │ │ │ │ └── ConversationFragment.kt │ │ │ ├── service │ │ │ │ └── ChatService.kt │ │ │ └── viewmodel │ │ │ │ ├── ChatViewModel.kt │ │ │ │ └── SplashViewModel.kt │ │ │ └── utils │ │ │ ├── Utils.kt │ │ │ └── extension │ │ │ ├── ActivityExtension.kt │ │ │ ├── ContextExtension.kt │ │ │ ├── JsonExtension.kt │ │ │ └── ViewExtension.kt │ └── res │ │ ├── drawable-hdpi │ │ ├── app_icon.png │ │ ├── user_icon.png │ │ └── user_icon_selected.png │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ ├── activity_conversation.xml │ │ ├── activity_home.xml │ │ ├── activity_setting.xml │ │ ├── activity_splash.xml │ │ ├── fragment_chat.xml │ │ ├── fragment_conversation.xml │ │ └── item_chatroom.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── navigation │ │ └── navigation_graph.xml │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── bot │ └── box │ └── whatsdelete │ └── ExampleUnitTest.kt ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── local.properties └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | # Project exclude paths 2 | /.gradle/ 3 | /app/build/ 4 | /app/build/intermediates/javac/debug/classes/ -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | xmlns:android 17 | 18 | ^$ 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | xmlns:.* 28 | 29 | ^$ 30 | 31 | 32 | BY_NAME 33 | 34 |
35 |
36 | 37 | 38 | 39 | .*:id 40 | 41 | http://schemas.android.com/apk/res/android 42 | 43 | 44 | 45 |
46 |
47 | 48 | 49 | 50 | .*:name 51 | 52 | http://schemas.android.com/apk/res/android 53 | 54 | 55 | 56 |
57 |
58 | 59 | 60 | 61 | name 62 | 63 | ^$ 64 | 65 | 66 | 67 |
68 |
69 | 70 | 71 | 72 | style 73 | 74 | ^$ 75 | 76 | 77 | 78 |
79 |
80 | 81 | 82 | 83 | .* 84 | 85 | ^$ 86 | 87 | 88 | BY_NAME 89 | 90 |
91 |
92 | 93 | 94 | 95 | .* 96 | 97 | http://schemas.android.com/apk/res/android 98 | 99 | 100 | ANDROID_ATTRIBUTE_ORDER 101 | 102 |
103 |
104 | 105 | 106 | 107 | .* 108 | 109 | .* 110 | 111 | 112 | BY_NAME 113 | 114 |
115 |
116 |
117 |
118 | 119 | 121 |
122 |
-------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | 20 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_activity_activity_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_activity_activity_ktx_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_annotation_annotation_experimental_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_arch_core_core_common_2_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_cardview_cardview_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_collection_collection_1_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_collection_collection_ktx_1_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_core_core_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_core_core_ktx_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_databinding_databinding_adapters_3_6_3_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_databinding_databinding_common_3_6_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_databinding_databinding_runtime_3_6_3_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_databinding_viewbinding_3_6_3_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_exifinterface_exifinterface_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_fragment_fragment_1_2_4_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_fragment_fragment_ktx_1_2_4_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_2_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_extensions_2_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_ktx_2_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_process_2_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_ktx_2_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_service_2_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_ktx_2_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_savedstate_2_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_multidex_multidex_2_0_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_navigation_navigation_common_2_2_2_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_navigation_navigation_common_ktx_2_2_2_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_navigation_navigation_fragment_2_2_2_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_navigation_navigation_fragment_ktx_2_2_2_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_navigation_navigation_runtime_2_2_2_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_navigation_navigation_runtime_ktx_2_2_2_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_navigation_navigation_ui_2_2_2_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_navigation_navigation_ui_ktx_2_2_2_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_room_room_common_2_2_5_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_room_room_runtime_2_2_5_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_room_room_rxjava2_2_2_5_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_sqlite_sqlite_2_0_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_sqlite_sqlite_framework_2_0_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_core_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_ext_junit_1_1_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_monitor_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_runner_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_transition_transition_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_google_android_material_material_1_2_0_alpha06_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_google_code_gson_gson_2_8_6_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_3_10_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_squareup_okio_okio_1_14_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_squareup_picasso_picasso_2_71828_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__io_reactivex_rxjava2_rxandroid_2_1_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__io_reactivex_rxjava2_rxjava_2_2_18_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__junit_junit_4_12_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_jetbrains_annotations_13_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_android_extensions_runtime_1_3_61_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_3_61_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_3_61_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_3_61_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_android_1_3_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_core_1_3_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_koin_koin_android_2_0_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_koin_koin_androidx_scope_2_0_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_koin_koin_androidx_viewmodel_2_0_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_koin_koin_core_2_0_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_reactivestreams_reactive_streams_1_0_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

WhatsDelete


2 |

3 | A fun, MacGyver application for recovering deleted messages of WhatsApp based on MVVM architecture and Repository Pattern 4 |

5 |
6 | 7 | ## Open-source libraries 8 | - Minimum SDK level 21 9 | - 100% [Kotlin](https://kotlinlang.org/) based 10 | - JetPack 11 | - LiveData - notify domain layer data to views. 12 | - Lifecycle - dispose observing data when lifecycle state changes. 13 | - ViewModel - UI related data holder, lifecycle aware. 14 | - Room Persistence - construct database. 15 | - Architecture 16 | - MVVM Architecture (View - DataBinding - ViewModel - Model) 17 | - Repository pattern 18 | - [Koin](https://github.com/InsertKoinIO/koin) - dependency injection 19 | - [Gson](https://github.com/google/gson) - for serializing and deserializing 20 | 21 | 22 | # License 23 | ![alt tag](https://img.shields.io/github/license/mashape/apistatus.svg) 24 | ``` 25 | Copyright (c) 2020 TheBotBox 26 | 27 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 28 | documentation files (the "Software"), to deal in the Software without restriction, including without 29 | limitation the rights to use, copy, 30 | modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to 31 | whom the Software is furnished to do so, subject to the following conditions: 32 | 33 | The above copyright notice and this permission notice shall be included in all copies or substantial portions 34 | of the Software. 35 | 36 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 37 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 38 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 39 | CONTRACT, TORT OR OTHERWISE,ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 40 | IN THE SOFTWARE. 41 | ``` 42 | 43 | [ ![](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg) ](https://saythanks.io/to/boxforbot%40gmail.com) 44 | 45 | -------------------------------------------------------------------------------- /WhatsAppDeletedMessageRecovery.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-kapt' 4 | apply plugin: 'kotlin-android-extensions' 5 | apply plugin: "androidx.navigation.safeargs.kotlin" 6 | 7 | android { 8 | compileSdkVersion 29 9 | buildToolsVersion "29.0.3" 10 | 11 | defaultConfig { 12 | applicationId "bot.box.whatsdelete" 13 | minSdkVersion 21 14 | targetSdkVersion 29 15 | versionCode 1 16 | versionName "1.0" 17 | 18 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 19 | } 20 | 21 | dataBinding.enabled = true 22 | 23 | compileOptions { 24 | sourceCompatibility JavaVersion.VERSION_1_8 25 | targetCompatibility JavaVersion.VERSION_1_8 26 | } 27 | 28 | kotlinOptions { 29 | jvmTarget = JavaVersion.VERSION_1_8.toString() 30 | } 31 | 32 | buildTypes { 33 | release { 34 | minifyEnabled false 35 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 36 | } 37 | } 38 | packagingOptions { 39 | exclude 'META-INF/atomicfu.kotlin_module' 40 | } 41 | } 42 | 43 | dependencies { 44 | implementation fileTree(dir: 'libs', include: ['*.jar']) 45 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 46 | implementation 'androidx.appcompat:appcompat:1.1.0' 47 | implementation 'androidx.core:core-ktx:1.2.0' 48 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 49 | testImplementation 'junit:junit:4.12' 50 | androidTestImplementation 'androidx.test.ext:junit:1.1.1' 51 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 52 | 53 | //multidex 54 | implementation 'androidx.multidex:multidex:2.0.1' 55 | 56 | //material 57 | implementation 'com.google.android.material:material:1.2.0-alpha06' 58 | 59 | //rx-java 60 | implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' 61 | implementation 'io.reactivex.rxjava2:rxjava:2.2.18' 62 | 63 | //picasso 64 | implementation 'com.squareup.picasso:picasso:2.71828' 65 | 66 | //arch components 67 | implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' 68 | implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0' 69 | 70 | //koin 71 | implementation 'org.koin:koin-androidx-viewmodel:2.0.1' 72 | implementation 'org.koin:koin-android:2.0.1' 73 | 74 | //swipe refresh 75 | implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' 76 | 77 | //navigation controller 78 | implementation "androidx.navigation:navigation-fragment-ktx:2.2.2" 79 | implementation "androidx.navigation:navigation-ui-ktx:2.2.2" 80 | 81 | // Room components 82 | implementation "androidx.room:room-runtime:2.2.5" 83 | kapt "androidx.room:room-compiler:2.2.5" 84 | implementation "androidx.room:room-rxjava2:2.2.5" 85 | 86 | //gson 87 | implementation "com.google.code.gson:gson:2.8.6" 88 | 89 | } 90 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/androidTest/java/bot/box/whatsdelete/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("bot.box.whatsdelete", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 30 | 33 | 34 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/MainApplication.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.app.Application 8 | import bot.box.whatsdelete.di.koinPreferenceModule 9 | import bot.box.whatsdelete.di.koinRepositoryModule 10 | import bot.box.whatsdelete.di.koinRoomModule 11 | import bot.box.whatsdelete.di.koinViewModel 12 | import org.koin.android.ext.koin.androidContext 13 | import org.koin.core.context.startKoin 14 | import org.koin.dsl.module 15 | 16 | class MainApplication : Application() { 17 | 18 | override fun onCreate() { 19 | super.onCreate() 20 | 21 | startKoin { 22 | androidContext(this@MainApplication) 23 | modules( 24 | listOf( 25 | koinPreferenceModule, 26 | koinRoomModule, 27 | koinRepositoryModule, 28 | koinViewModel 29 | ) 30 | ) 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/data/database/ChatRoomDB.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.data.database 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.content.Context 8 | import androidx.room.* 9 | import bot.box.whatsdelete.data.database.dao.ChatDao 10 | import bot.box.whatsdelete.data.database.entity.Chat 11 | import bot.box.whatsdelete.data.database.typeconverters.ChatConverter 12 | import bot.box.whatsdelete.data.database.typeconverters.ConversationConverter 13 | 14 | private const val DATABASE_NAME = "chatroom.db" 15 | 16 | @Database( 17 | entities = [Chat::class], 18 | version = 1, 19 | exportSchema = false 20 | ) 21 | @TypeConverters(ChatConverter::class, ConversationConverter::class) 22 | abstract class ChatRoomDB : RoomDatabase() { 23 | 24 | abstract fun getDao(): ChatDao 25 | 26 | companion object { 27 | @Volatile 28 | private var instance: ChatRoomDB? = null 29 | private val LOCK: Any = Any() 30 | 31 | operator fun invoke(context: Context) = instance ?: synchronized(LOCK) { 32 | instance ?: createDatabase(context).also { instance = it } 33 | } 34 | 35 | 36 | private fun createDatabase(context: Context): ChatRoomDB = 37 | Room.databaseBuilder( 38 | context.applicationContext, 39 | ChatRoomDB::class.java, 40 | DATABASE_NAME 41 | ).build() 42 | } 43 | 44 | 45 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/data/database/dao/ChatDao.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.data.database.dao 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import androidx.room.* 8 | import bot.box.whatsdelete.data.database.entity.Chat 9 | import bot.box.whatsdelete.data.database.entity.ChatRoom 10 | import io.reactivex.Maybe 11 | import io.reactivex.Single 12 | 13 | @Dao 14 | interface ChatDao { 15 | /** 16 | * @param chat will insert all the data of particular chat 17 | */ 18 | @Insert(onConflict = OnConflictStrategy.REPLACE) 19 | fun insertMessage(chat: Chat) 20 | 21 | /** 22 | * will return fields that only required for ChatFragment 23 | * 24 | * @return details for populating @ChatFragment 25 | */ 26 | @SuppressWarnings(RoomWarnings.CURSOR_MISMATCH) 27 | @Query("SELECT name, last_message, time, dp FROM chatRooms") 28 | fun loadChatRooms(): Single> 29 | 30 | 31 | /** 32 | * @param name of user for which details needs to be fetched 33 | * @return all conversation of the particular user 34 | */ 35 | @Query("SELECT * FROM chatRooms WHERE name=:name") 36 | fun fetchChatsOfUser(name: String?): Single 37 | 38 | 39 | } 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/data/database/entity/Chat.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.data.database.entity 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import androidx.annotation.NonNull 8 | import androidx.room.ColumnInfo 9 | import androidx.room.Entity 10 | import androidx.room.PrimaryKey 11 | import androidx.room.TypeConverters 12 | import bot.box.whatsdelete.data.database.typeconverters.ConversationConverter 13 | import java.util.* 14 | 15 | @Entity(tableName = "chatRooms") 16 | data class Chat( 17 | @ColumnInfo(name = "name") @PrimaryKey @NonNull var name: String = "", 18 | @ColumnInfo(name = "last_message") var lastMessage: String = "", 19 | @ColumnInfo(name = "time") var time: Long = System.currentTimeMillis(), 20 | @ColumnInfo(name = "allChats") 21 | @TypeConverters(ConversationConverter::class) var allMessages: ArrayList, 22 | @ColumnInfo(name = "dp", typeAffinity = ColumnInfo.BLOB) var dp: ByteArray 23 | ) -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/data/database/entity/ChatRoom.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.data.database.entity 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import androidx.annotation.NonNull 8 | import androidx.room.ColumnInfo 9 | import androidx.room.PrimaryKey 10 | 11 | 12 | data class ChatRoom( 13 | @ColumnInfo(name = "name") @PrimaryKey @NonNull var name: String = "", 14 | @ColumnInfo(name = "last_message") var lastMessage: String = "", 15 | @ColumnInfo(name = "time") var time: Long = System.currentTimeMillis(), 16 | @ColumnInfo(name = "dp", typeAffinity = ColumnInfo.BLOB) var dp: ByteArray 17 | ) -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/data/database/entity/Conversation.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.data.database.entity 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | data class Conversation( 8 | var message: String = "", 9 | var time: Long = 0, 10 | var isDeleted: Boolean = false 11 | ) -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/data/database/typeconverters/ChatConverter.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.data.database.typeconverters 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import androidx.room.TypeConverter 8 | import com.google.gson.Gson 9 | import com.google.gson.reflect.TypeToken 10 | 11 | class ChatConverter { 12 | @TypeConverter 13 | fun fromString(value: String): ArrayList? { 14 | val listType = object : TypeToken>() { 15 | 16 | }.type 17 | return Gson().fromJson>(value, listType) 18 | } 19 | 20 | @TypeConverter 21 | fun fromArrayList(list: ArrayList): String { 22 | val gson = Gson() 23 | return gson.toJson(list) 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/data/database/typeconverters/ConversationConverter.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.data.database.typeconverters 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import androidx.room.TypeConverter 8 | import bot.box.whatsdelete.data.database.entity.Conversation 9 | import com.google.gson.Gson 10 | import com.google.gson.reflect.TypeToken 11 | 12 | class ConversationConverter { 13 | 14 | @TypeConverter 15 | fun fromConversationList(mList: List?): String? { 16 | if (mList == null) { 17 | return null 18 | } 19 | val gson = Gson() 20 | val type = object : TypeToken>() { 21 | 22 | }.type 23 | return gson.toJson(mList, type) 24 | } 25 | 26 | @TypeConverter 27 | fun toConversationList(mString: String?): ArrayList? { 28 | if (mString == null) { 29 | return null 30 | } 31 | val gson = Gson() 32 | val type = object : TypeToken>() { 33 | 34 | }.type 35 | return gson.fromJson>(mString, type) 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/data/preference/IPreference.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.data.preference 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | interface IPreference { 8 | fun isChatRecoveryServiceEnabled(): Boolean 9 | fun chatRecoveryServiceStatus(status: Boolean) 10 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/data/preference/PreferenceImpl.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.data.preference 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.content.Context 8 | import android.content.SharedPreferences 9 | import androidx.core.content.edit 10 | 11 | 12 | const val KEY_IS_CHAT_RECOVERY_SERVICE_ENABLED = "KEY_IS_CHAT_RECOVERY_SERVICE_ENABLED" 13 | 14 | class PreferenceImpl(context: Context) : IPreference { 15 | private val sharedPref: SharedPreferences by lazy { 16 | context.getSharedPreferences("CAMPAIGN", Context.MODE_PRIVATE) 17 | } 18 | 19 | fun clearData() { 20 | sharedPref.edit { clear() } 21 | } 22 | 23 | override fun isChatRecoveryServiceEnabled(): Boolean = 24 | sharedPref.getBoolean(KEY_IS_CHAT_RECOVERY_SERVICE_ENABLED, true) 25 | 26 | override fun chatRecoveryServiceStatus(status: Boolean) { 27 | sharedPref.edit { 28 | putBoolean(KEY_IS_CHAT_RECOVERY_SERVICE_ENABLED, status) 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/data/repository/IRepository.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.data.repository 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import bot.box.whatsdelete.data.database.entity.Chat 8 | import bot.box.whatsdelete.data.database.entity.ChatRoom 9 | import io.reactivex.Maybe 10 | import io.reactivex.Single 11 | 12 | interface IRepository { 13 | /** 14 | * for inserting new notification into db from ChatService.kt 15 | */ 16 | fun insertMessage(chat: Chat) 17 | 18 | /** 19 | * for returning all the Chat Rooms for ChatFragment.kt 20 | */ 21 | fun loadChatRooms(): Single> 22 | 23 | 24 | /** 25 | * load all conversation of the particular user 26 | */ 27 | fun fetchChatsOfUser(name: String?): Single 28 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/data/repository/RepositoryImpl.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.data.repository 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import bot.box.whatsdelete.data.database.dao.ChatDao 8 | import bot.box.whatsdelete.data.database.entity.Chat 9 | import bot.box.whatsdelete.data.database.entity.ChatRoom 10 | import io.reactivex.Maybe 11 | import io.reactivex.Single 12 | 13 | class RepositoryImpl(private val dao: ChatDao) : IRepository { 14 | 15 | override fun insertMessage(chat: Chat) = dao.insertMessage(chat) 16 | 17 | override fun loadChatRooms(): Single> = dao.loadChatRooms() 18 | 19 | override fun fetchChatsOfUser(name: String?): Single = dao.fetchChatsOfUser(name) 20 | 21 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/di/KoinModule.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.di 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import bot.box.whatsdelete.data.database.ChatRoomDB 8 | import bot.box.whatsdelete.data.database.dao.ChatDao 9 | import bot.box.whatsdelete.data.preference.IPreference 10 | import bot.box.whatsdelete.data.preference.PreferenceImpl 11 | import bot.box.whatsdelete.data.repository.IRepository 12 | import bot.box.whatsdelete.data.repository.RepositoryImpl 13 | import bot.box.whatsdelete.ui.viewmodel.ChatViewModel 14 | import bot.box.whatsdelete.ui.viewmodel.SplashViewModel 15 | import org.koin.androidx.viewmodel.dsl.viewModel 16 | import org.koin.dsl.module 17 | 18 | val koinRoomModule = module(override = true) { 19 | single { ChatRoomDB.invoke(get()) } 20 | single { ChatRoomDB(get()).getDao() } 21 | } 22 | 23 | val koinPreferenceModule = module(override = true) { 24 | single { PreferenceImpl(get()) } 25 | } 26 | 27 | val koinRepositoryModule = module(override = true) { 28 | single { RepositoryImpl(get()) } 29 | } 30 | 31 | val koinViewModel = module { 32 | viewModel { SplashViewModel(get()) } 33 | viewModel { ChatViewModel(get(), get(), get()) } 34 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/ui/activity/HomeActivity.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.ui.activity 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.os.Bundle 8 | import androidx.databinding.DataBindingUtil 9 | import bot.box.whatsdelete.R 10 | import bot.box.whatsdelete.databinding.ActivityHomeBinding 11 | import bot.box.whatsdelete.ui.base.BaseActivity 12 | import bot.box.whatsdelete.ui.viewmodel.ChatViewModel 13 | import bot.box.whatsdelete.utils.extension.getProgressDialog 14 | import org.koin.androidx.viewmodel.ext.android.viewModel 15 | 16 | class HomeActivity : BaseActivity() { 17 | 18 | private val mViewModel by viewModel() 19 | private val dialog by lazy { getProgressDialog() } 20 | 21 | override fun onCreate(savedInstanceState: Bundle?) { 22 | super.onCreate(savedInstanceState) 23 | DataBindingUtil.setContentView(this, R.layout.activity_home) 24 | 25 | } 26 | 27 | 28 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/ui/activity/SettingActivity.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.ui.activity 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.os.Bundle 8 | import bot.box.whatsdelete.R 9 | import bot.box.whatsdelete.ui.base.BaseActivity 10 | 11 | class SettingActivity : BaseActivity() { 12 | 13 | override fun onCreate(savedInstanceState: Bundle?) { 14 | super.onCreate(savedInstanceState) 15 | setContentView(R.layout.activity_setting) 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/ui/activity/SplashActivity.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.ui.activity 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.os.Bundle 8 | import android.os.Handler 9 | import androidx.lifecycle.Observer 10 | import bot.box.whatsdelete.R 11 | import bot.box.whatsdelete.ui.base.BaseActivity 12 | import bot.box.whatsdelete.ui.viewmodel.SplashViewModel 13 | import bot.box.whatsdelete.utils.extension.showADialog 14 | import bot.box.whatsdelete.utils.extension.startNewActivity 15 | import org.koin.androidx.viewmodel.ext.android.viewModel 16 | 17 | class SplashActivity : BaseActivity() { 18 | 19 | private val mViewModel by viewModel() 20 | 21 | override fun onCreate(savedInstanceState: Bundle?) { 22 | super.onCreate(savedInstanceState) 23 | setContentView(R.layout.activity_splash) 24 | 25 | lifecycle.addObserver(mViewModel) 26 | mViewModel._notificationPermission.observe(this, Observer { isPermissionGranted -> 27 | if (isPermissionGranted) { 28 | startNewActivity() 29 | this@SplashActivity.finish() 30 | } else { 31 | showADialog( 32 | R.string.grant_permission, 33 | R.string.allow_permission, 34 | R.string.exit, 35 | { 36 | mViewModel.askNotificationPermission() 37 | }, 38 | { 39 | this@SplashActivity.finish() 40 | }) 41 | 42 | } 43 | 44 | }) 45 | 46 | } 47 | 48 | } 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/ui/adapter/ChatRoomAdapter.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.ui.adapter 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.graphics.BitmapFactory 8 | import android.graphics.drawable.ColorDrawable 9 | import android.os.Build 10 | import android.view.LayoutInflater 11 | import android.view.View 12 | import android.view.ViewGroup 13 | import androidx.core.content.ContextCompat 14 | import androidx.databinding.DataBindingUtil 15 | import androidx.recyclerview.widget.RecyclerView 16 | import bot.box.whatsdelete.R 17 | import bot.box.whatsdelete.data.database.entity.ChatRoom 18 | import bot.box.whatsdelete.databinding.ItemChatroomBinding 19 | import bot.box.whatsdelete.utils.Utils 20 | import bot.box.whatsdelete.utils.extension.getContextCompatColor 21 | import bot.box.whatsdelete.utils.extension.getContextCompatDrawable 22 | 23 | class ChatRoomAdapter : RecyclerView.Adapter() { 24 | 25 | private lateinit var mBinding: ItemChatroomBinding 26 | private var mChatRooms: MutableList? = null 27 | private var mSelectedChat: List = ArrayList() 28 | 29 | fun refreshChatRoom(mList: MutableList) { 30 | this.mChatRooms = mList 31 | notifyDataSetChanged() 32 | } 33 | 34 | fun refreshSelectedChat(mList: List) { 35 | this.mSelectedChat = mList 36 | notifyDataSetChanged() 37 | } 38 | 39 | fun refreshList() { 40 | notifyDataSetChanged() 41 | } 42 | 43 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ChatRoomHolder { 44 | return ChatRoomHolder( 45 | DataBindingUtil.inflate( 46 | LayoutInflater.from(parent.context), 47 | R.layout.item_chatroom, 48 | parent, 49 | false 50 | ).also { mBinding = it } 51 | ) 52 | } 53 | 54 | override fun getItemCount(): Int = if (!mChatRooms.isNullOrEmpty()) mChatRooms!!.size else 0 55 | 56 | override fun onBindViewHolder(holder: ChatRoomHolder, position: Int) { 57 | mBinding.chatRoom = mChatRooms!![position] 58 | 59 | val colorDrawableSelected = 60 | holder.binding.root.context.getContextCompatDrawable(R.color.foreground_chat_select) 61 | val colorDrawableTransparent = 62 | holder.binding.root.context.getContextCompatDrawable(android.R.color.transparent) 63 | 64 | 65 | if (mSelectedChat.contains(mChatRooms!![position].name)) { // when items are selected 66 | 67 | holder.binding.ivUserIconSelected.visibility = View.VISIBLE // show dp selected icon 68 | 69 | 70 | if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M) { // showing foreground selection 71 | holder.binding.parent.foreground = colorDrawableSelected 72 | } else { 73 | holder.binding.parent.apply { 74 | setBackgroundColor(context.getContextCompatColor(R.color.foreground_chat_select)) 75 | } 76 | } 77 | } else { // when items are unselected 78 | holder.binding.ivUserIconSelected.visibility = View.GONE // hide dp selected icon 79 | 80 | 81 | if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M) { // transparent foreground selection 82 | holder.binding.parent.foreground = colorDrawableTransparent 83 | } else { 84 | holder.binding.parent.apply { 85 | setBackgroundColor(context.getContextCompatColor(android.R.color.transparent)) 86 | } 87 | } 88 | } 89 | holder.binding.tvUserName.text = mChatRooms?.get(position)?.name 90 | 91 | 92 | if (mChatRooms?.get(position)?.dp != null) { // set dp 93 | holder.binding.ivUserIcon.setImageBitmap( 94 | BitmapFactory.decodeByteArray( 95 | mChatRooms?.get(position)?.dp, 96 | 0, 97 | mChatRooms!![position].dp.size 98 | ) 99 | ) 100 | } else { 101 | holder.binding.ivUserIcon.setImageResource(R.drawable.user_icon) 102 | } 103 | } 104 | 105 | 106 | class ChatRoomHolder(val binding: ItemChatroomBinding) : RecyclerView.ViewHolder(binding.root) 107 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/ui/base/BaseActivity.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.ui.base 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.content.ComponentName 8 | import android.content.Intent 9 | import android.os.Build 10 | import android.os.Bundle 11 | import android.provider.Settings 12 | import androidx.appcompat.app.AppCompatActivity 13 | import bot.box.whatsdelete.ui.service.ChatService 14 | 15 | abstract class BaseActivity : AppCompatActivity() { 16 | 17 | override fun onCreate(savedInstanceState: Bundle?) { 18 | super.onCreate(savedInstanceState) 19 | 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/ui/base/BaseFragment.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.ui.base 2 | /** 3 | * Created by Barry Allen . 4 | * boxforbot@gmail.com 5 | */ 6 | import androidx.fragment.app.Fragment 7 | 8 | abstract class BaseFragment : Fragment() { 9 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/ui/base/BaseViewModel.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.ui.base 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.app.Application 8 | import android.content.ComponentName 9 | import android.content.Intent 10 | import android.content.Intent.FLAG_ACTIVITY_NEW_TASK 11 | import android.provider.Settings 12 | import androidx.lifecycle.AndroidViewModel 13 | import bot.box.whatsdelete.ui.service.ChatService 14 | 15 | abstract class BaseViewModel(private val mApplication: Application) : 16 | AndroidViewModel(mApplication) { 17 | 18 | fun isNotificationAccessGranted(): Boolean { 19 | val cn = ComponentName(mApplication, ChatService::class.java) 20 | val flat = Settings.Secure.getString( 21 | mApplication.contentResolver, 22 | "enabled_notification_listeners" 23 | ) 24 | return flat != null && flat.contains(cn.flattenToString()) 25 | } 26 | 27 | fun askNotificationPermission() { 28 | mApplication.startActivity( 29 | Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS") 30 | .addFlags(FLAG_ACTIVITY_NEW_TASK) 31 | ) 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/ui/fragment/ChatFragment.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.ui.fragment 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.os.Bundle 8 | import android.view.LayoutInflater 9 | import android.view.View 10 | import android.view.ViewGroup 11 | import androidx.databinding.DataBindingUtil 12 | import androidx.lifecycle.Observer 13 | import bot.box.whatsdelete.R 14 | import bot.box.whatsdelete.data.repository.IRepository 15 | import bot.box.whatsdelete.databinding.FragmentChatBinding 16 | import bot.box.whatsdelete.ui.adapter.ChatRoomAdapter 17 | import bot.box.whatsdelete.ui.base.BaseFragment 18 | import bot.box.whatsdelete.ui.viewmodel.ChatViewModel 19 | import org.koin.android.ext.android.inject 20 | import org.koin.androidx.viewmodel.ext.android.sharedViewModel 21 | 22 | typealias _OBSERVER = androidx.lifecycle.Observer 23 | 24 | class ChatFragment : BaseFragment() { 25 | private lateinit var mBinding: FragmentChatBinding 26 | private val mViewModel by sharedViewModel() 27 | 28 | override fun onCreateView( 29 | inflater: LayoutInflater, 30 | container: ViewGroup?, 31 | savedInstanceState: Bundle? 32 | ): View? { 33 | return DataBindingUtil.inflate( 34 | inflater, 35 | R.layout.fragment_chat, container, false 36 | ).also { 37 | mBinding = it 38 | mBinding.viewModel = mViewModel 39 | mBinding.lifecycleOwner = this 40 | }.root 41 | } 42 | 43 | private val mChatRoomAdapter: ChatRoomAdapter by lazy { ChatRoomAdapter() } 44 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 45 | super.onViewCreated(view, savedInstanceState) 46 | 47 | mBinding.apply { 48 | mRecyclerView.adapter = mChatRoomAdapter 49 | refreshLayout.setOnRefreshListener { mViewModel.loadChatRooms() } 50 | } 51 | 52 | mViewModel.loadChatRooms() 53 | mViewModel._loadChatRooms.observe(viewLifecycleOwner, _OBSERVER { 54 | mChatRoomAdapter.refreshChatRoom(it) 55 | mBinding.refreshLayout.isRefreshing = false 56 | }) 57 | 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/ui/fragment/ConversationFragment.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.ui.fragment 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import bot.box.whatsdelete.ui.base.BaseFragment 8 | 9 | class ConversationFragment : BaseFragment() { 10 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/ui/service/ChatService.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.ui.service 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.app.Notification 8 | import android.app.Service 9 | import android.content.Intent 10 | import android.graphics.Bitmap 11 | import android.graphics.BitmapFactory 12 | import android.os.Bundle 13 | import android.service.notification.NotificationListenerService 14 | import android.service.notification.StatusBarNotification 15 | import android.util.Log 16 | import bot.box.whatsdelete.R 17 | import bot.box.whatsdelete.data.database.entity.Chat 18 | import bot.box.whatsdelete.data.database.entity.ChatRoom 19 | import bot.box.whatsdelete.data.database.entity.Conversation 20 | import bot.box.whatsdelete.data.preference.IPreference 21 | import bot.box.whatsdelete.data.repository.IRepository 22 | import bot.box.whatsdelete.utils.* 23 | import io.reactivex.Completable 24 | import io.reactivex.MaybeObserver 25 | import io.reactivex.Single 26 | import io.reactivex.SingleObserver 27 | import io.reactivex.android.schedulers.AndroidSchedulers 28 | import io.reactivex.disposables.CompositeDisposable 29 | import io.reactivex.disposables.Disposable 30 | import io.reactivex.schedulers.Schedulers 31 | import org.koin.core.KoinComponent 32 | import org.koin.core.inject 33 | import java.io.ByteArrayOutputStream 34 | 35 | 36 | class ChatService : NotificationListenerService(), KoinComponent { 37 | private val TAG = ChatService::class.java.simpleName 38 | 39 | 40 | private val iPreference by inject() 41 | private val iRepository by inject() 42 | 43 | private val disposable = CompositeDisposable() 44 | 45 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { 46 | return Service.START_STICKY 47 | } 48 | 49 | override fun onListenerConnected() { 50 | super.onListenerConnected() 51 | } 52 | 53 | override fun onListenerDisconnected() { 54 | super.onListenerDisconnected() 55 | } 56 | 57 | override fun onLowMemory() { 58 | super.onLowMemory() 59 | } 60 | 61 | override fun onNotificationPosted(sbn: StatusBarNotification?, rankingMap: RankingMap?) { 62 | super.onNotificationPosted(sbn, rankingMap) 63 | } 64 | 65 | override fun onNotificationPosted(sbn: StatusBarNotification?) { 66 | super.onNotificationPosted(sbn) 67 | 68 | if (!iPreference.isChatRecoveryServiceEnabled()) return 69 | if (sbn!!.notification.flags and Notification.FLAG_GROUP_SUMMARY != 0) return 70 | 71 | if (sbn.packageName == WHATSAPP_PACKAGE) { 72 | val bundle: Bundle = sbn.notification.extras 73 | val name: String? = bundle.getString("android.title") 74 | val message: String? = 75 | if (bundle.getCharSequence("android.text") != null) bundle.getCharSequence("android.text").toString() else "" 76 | 77 | val largeIcon: Bitmap = try { 78 | bundle.get(Notification.EXTRA_LARGE_ICON) as Bitmap 79 | } catch (e: Exception) { 80 | BitmapFactory.decodeResource(resources, R.drawable.user_icon) 81 | } 82 | 83 | if (name != null && message != null) { // do not save these messages in database as these are application generated messages 84 | if (name == WHATSAPP || 85 | name == WHATSAPP_WEB || 86 | name == FINISHED_BACKUP || 87 | name == BACKUP_PROGRESS || 88 | name == BACKUP_PAUSED || 89 | name == YOU || 90 | message == CHECKING_NEW_MESSAGE || 91 | message == CHECKING_WEB_LOGIN || 92 | message == BACKUP_INFO || 93 | message == WAITING_FOR_WIFI || 94 | message == RESTORE_MEDIA 95 | ) return 96 | } 97 | 98 | /** 99 | * firstly will check if user exist or not in db 100 | * if user does not exist, onError block will be called in that case. 101 | * & if user exist then we will update new message in existing message array 102 | */ 103 | disposable.add( 104 | iRepository.fetchChatsOfUser(name).subscribeOn(Schedulers.io()) 105 | .observeOn(Schedulers.io()) 106 | .subscribe(userFound@{ chat -> 107 | val currentTime = System.currentTimeMillis() 108 | /** 109 | * avoid saving redundant message in db 110 | * Case handled: if message in notification tray is unread 111 | * and a new message comes in, then the unread message get saved again. 112 | */ 113 | if (chat.lastMessage == message) 114 | return@userFound 115 | 116 | val chatList = ArrayList() 117 | for (conversation in chat.allMessages) { 118 | chatList.add(conversation) 119 | } 120 | 121 | val conversation = Conversation().apply { 122 | this.message = message ?: "" 123 | this.isDeleted = false 124 | this.time = currentTime 125 | } 126 | chatList.add(conversation) 127 | 128 | val chatModel = 129 | Chat(name!!, message!!, currentTime, chatList, getByteFromDP(largeIcon)) 130 | 131 | iRepository.insertMessage(chatModel) 132 | }, { 133 | Log.d(TAG, "User with this name does not exist in db $it") 134 | disposable.add( 135 | Completable.fromAction { 136 | val currentTime = System.currentTimeMillis() 137 | val chatList = ArrayList() 138 | val conversation = Conversation().apply { 139 | this.message = message ?: "" 140 | this.time = currentTime 141 | this.isDeleted = false 142 | } 143 | chatList.add(conversation) 144 | 145 | val chatModel = 146 | Chat( 147 | name!!, 148 | message!!, 149 | currentTime, 150 | chatList, 151 | getByteFromDP(largeIcon) 152 | ) 153 | 154 | iRepository.insertMessage(chatModel) 155 | }.subscribeOn(Schedulers.io()).observeOn(Schedulers.io()).subscribe({ 156 | Log.d(TAG, "User inserted in db") 157 | }, { 158 | Log.d(TAG, "Error: User is not inserted into db $it") 159 | }) 160 | ) 161 | 162 | }) 163 | ) 164 | } 165 | } 166 | 167 | private fun getByteFromDP(dp: Bitmap): ByteArray { 168 | val stream = ByteArrayOutputStream() 169 | dp.compress(Bitmap.CompressFormat.PNG, 100, stream) 170 | return stream.toByteArray() 171 | } 172 | 173 | override fun onDestroy() { 174 | super.onDestroy() 175 | if (!disposable.isDisposed) disposable.dispose() 176 | } 177 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/ui/viewmodel/ChatViewModel.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.ui.viewmodel 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.app.Application 8 | import androidx.lifecycle.AndroidViewModel 9 | import androidx.lifecycle.LifecycleObserver 10 | import androidx.lifecycle.LiveData 11 | import androidx.lifecycle.MutableLiveData 12 | import bot.box.whatsdelete.data.database.entity.Chat 13 | import bot.box.whatsdelete.data.database.entity.ChatRoom 14 | import bot.box.whatsdelete.data.preference.IPreference 15 | import bot.box.whatsdelete.data.repository.IRepository 16 | import bot.box.whatsdelete.ui.base.BaseViewModel 17 | import io.reactivex.Scheduler 18 | import io.reactivex.android.schedulers.AndroidSchedulers 19 | import io.reactivex.disposables.CompositeDisposable 20 | import io.reactivex.schedulers.Schedulers 21 | 22 | class ChatViewModel( 23 | application: Application, 24 | private val iRepository: IRepository, 25 | private val iPreference: IPreference 26 | ) : BaseViewModel(application) { 27 | 28 | private val disposable = CompositeDisposable() 29 | 30 | private val loadChatRooms: MutableLiveData> = MutableLiveData() 31 | val _loadChatRooms: LiveData> 32 | get() = loadChatRooms 33 | 34 | fun loadChatRooms() { 35 | disposable.add( 36 | iRepository.loadChatRooms().subscribeOn(Schedulers.io()) 37 | .observeOn(AndroidSchedulers.mainThread()).subscribe({ 38 | loadChatRooms.value = it 39 | }, { 40 | 41 | }) 42 | ) 43 | } 44 | 45 | override fun onCleared() { 46 | super.onCleared() 47 | if (!disposable.isDisposed) disposable.dispose() 48 | } 49 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/ui/viewmodel/SplashViewModel.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.ui.viewmodel 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.app.Application 8 | import androidx.lifecycle.* 9 | import bot.box.whatsdelete.ui.base.BaseViewModel 10 | 11 | class SplashViewModel(private val mApplication: Application) : BaseViewModel(mApplication), 12 | LifecycleObserver { 13 | 14 | private val notificationPermission: MutableLiveData = MutableLiveData() 15 | val _notificationPermission: LiveData get() = notificationPermission 16 | 17 | @OnLifecycleEvent(Lifecycle.Event.ON_RESUME) 18 | fun checkForNotificationPermission() { 19 | notificationPermission.value = isNotificationAccessGranted() 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/utils/Utils.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.utils 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import java.text.SimpleDateFormat 8 | import java.util.* 9 | 10 | /** 11 | * messages from by WhatsApp application, not to add in database 12 | */ 13 | const val WHATSAPP = "WhatsApp" //sender_name 14 | const val WHATSAPP_WEB = "WhatsApp Web"//sender_name 15 | const val FINISHED_BACKUP = "Finished backup"//sender_name 16 | const val BACKUP_PROGRESS = "Backup in progress"//sender name 17 | const val BACKUP_PAUSED = "Backup paused" //sender name 18 | const val YOU = "You"//sender name 19 | const val RESTORE_MEDIA = "Restoring media" 20 | const val CHECKING_NEW_MESSAGE = "Checking for new messages"//sender message 21 | const val CHECKING_WEB_LOGIN = "WhatsApp Web is currently active"//sender message 22 | const val BACKUP_INFO = "Tap for more info"//sender message 23 | const val WAITING_FOR_WIFI = "Waiting for Wi-Fi"// sender message 24 | const val MESSAGE_DELETED = "This message was deleted" 25 | 26 | const val WHATSAPP_PACKAGE = "com.whatsapp" 27 | 28 | object Utils { 29 | fun getActualTimeFromTimeStamp(timeStamp: Long): String { 30 | val dt = Date(timeStamp) 31 | val sdf = SimpleDateFormat("hh:mm aa", Locale.getDefault()) 32 | return sdf.format(dt) 33 | } 34 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/utils/extension/ActivityExtension.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.utils.extension 2 | /** 3 | * Created by Barry Allen . 4 | * boxforbot@gmail.com 5 | */ 6 | import android.app.Activity 7 | import android.app.AlertDialog 8 | import android.app.ProgressDialog 9 | import android.content.Context 10 | import android.content.DialogInterface 11 | import android.content.Intent 12 | import android.graphics.drawable.Drawable 13 | import android.location.LocationManager 14 | import android.net.Uri 15 | import android.view.View 16 | import android.widget.PopupMenu 17 | import androidx.annotation.ColorRes 18 | import androidx.annotation.DrawableRes 19 | import androidx.appcompat.app.AppCompatActivity 20 | import androidx.core.content.ContextCompat 21 | import androidx.fragment.app.* 22 | 23 | 24 | inline fun Activity.startNewActivity() = Intent( 25 | this, T::class.java 26 | ).apply { startActivity(this) } 27 | 28 | 29 | fun showPopUpMenu(menuRes: Int, view: View, listener: PopupMenu.OnMenuItemClickListener) { 30 | val popUp = PopupMenu(view.context, view) 31 | popUp.inflate(menuRes) 32 | 33 | popUp.setOnMenuItemClickListener(listener) 34 | popUp.show() 35 | } 36 | 37 | 38 | fun Activity.getProgressDialog(): ProgressDialog { 39 | return ProgressDialog(this).apply { 40 | setCancelable(false) 41 | setMessage("Please Wait...") 42 | } 43 | } 44 | 45 | 46 | fun Context.getContextCompatDrawable(@DrawableRes drawableResource: Int): Drawable? = 47 | ContextCompat.getDrawable(this, drawableResource) 48 | fun Context.getContextCompatColor(@ColorRes color: Int) = ContextCompat.getColor(this, color) 49 | 50 | fun Activity.getContextCompatDrawable(@DrawableRes drawableResource: Int): Drawable? = 51 | ContextCompat.getDrawable(this, drawableResource) 52 | fun Activity.getContextCompatColor(@ColorRes color: Int) = ContextCompat.getColor(this, color) 53 | 54 | 55 | fun FragmentActivity.showADialog( 56 | message: Int, 57 | buttonPositive: Int, 58 | buttonNegative: Int, 59 | onPositiveButton: () -> Unit, 60 | onNegativeButton: () -> Unit 61 | ) { 62 | showADialog( 63 | this, 64 | this.resources.getString(message), 65 | this.resources.getString(buttonPositive), 66 | this.resources.getString(buttonNegative), 67 | onPositiveButton, 68 | onNegativeButton 69 | ) 70 | } 71 | 72 | private fun showADialog( 73 | context: FragmentActivity, 74 | message: String, 75 | buttonPositive: String?, 76 | buttonNegative: String?, 77 | onPositiveButton: () -> Unit, 78 | onNegativeButton: () -> Unit 79 | ) { 80 | val builder = 81 | AlertDialog.Builder(context) 82 | builder.setMessage("" + message) 83 | builder.setCancelable(false) 84 | builder.setPositiveButton( 85 | buttonPositive 86 | ) { dialog: DialogInterface?, _: Int -> 87 | dialog?.dismiss() 88 | onPositiveButton.invoke() 89 | } 90 | builder.setNegativeButton( 91 | buttonNegative 92 | ) { dialog: DialogInterface?, _: Int -> 93 | dialog?.dismiss() 94 | onNegativeButton.invoke() 95 | } 96 | builder.setOnCancelListener { dialog: DialogInterface? -> 97 | dialog?.dismiss() 98 | } 99 | val dialog = builder.create() 100 | try { 101 | dialog.setCanceledOnTouchOutside(false) 102 | if (!context.isFinishing) { 103 | dialog.show() 104 | } 105 | } catch (e: Exception) { 106 | e.printStackTrace() 107 | } 108 | } -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/utils/extension/ContextExtension.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.utils.extension 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.content.Context 8 | import android.net.ConnectivityManager 9 | import android.view.View 10 | import android.view.inputmethod.InputMethodManager 11 | import android.widget.Toast 12 | 13 | fun Context.showToast(message: String) { 14 | Toast.makeText(this, message, Toast.LENGTH_SHORT).show() 15 | } 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/utils/extension/JsonExtension.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.utils.extension 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | 8 | import com.google.gson.Gson 9 | import com.google.gson.reflect.TypeToken 10 | 11 | // Transform simple object to String with Gson 12 | inline fun T.toPrettyJson(): String = Gson().toJson(this, T::class.java) 13 | 14 | // Transform String Json to Object 15 | inline fun String.fromPrettyJson(): T = Gson().fromJson(this, T::class.java) 16 | 17 | // Transform String List Json to Object 18 | inline fun String.fromPrettyJsonList(): MutableList = 19 | when (this.isNotEmpty()) { 20 | true -> Gson().fromJson(this, object : TypeToken>() {}.type) 21 | false -> mutableListOf() 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/bot/box/whatsdelete/utils/extension/ViewExtension.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete.utils.extension 2 | 3 | /** 4 | * Created by Barry Allen . 5 | * boxforbot@gmail.com 6 | */ 7 | import android.text.Editable 8 | import android.text.TextWatcher 9 | import android.view.View 10 | import android.view.inputmethod.EditorInfo 11 | import android.widget.EditText 12 | 13 | fun View.gone() { 14 | visibility = View.GONE 15 | } 16 | 17 | fun View.invisible() { 18 | visibility = View.INVISIBLE 19 | } 20 | 21 | fun View.visible() { 22 | visibility = View.VISIBLE 23 | } 24 | 25 | fun View.isVisible(): Boolean = visibility == View.VISIBLE 26 | fun View.isGone(): Boolean = visibility == View.GONE 27 | fun View.isInvisible(): Boolean = visibility == View.INVISIBLE 28 | 29 | 30 | fun EditText.onTextChanged(listener: (String) -> Unit) { 31 | this.addTextChangedListener(object : TextWatcher { 32 | 33 | override fun afterTextChanged(s: Editable?) { 34 | listener(s.toString()) 35 | } 36 | 37 | override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} 38 | 39 | override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {} 40 | }) 41 | } 42 | 43 | infix fun EditText.onDone(callback: (String) -> Unit) { 44 | setOnEditorActionListener { _, actionId, _ -> 45 | if (actionId == EditorInfo.IME_ACTION_DONE) { 46 | callback.invoke(text.toString()) 47 | true 48 | } 49 | false 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/app/src/main/res/drawable-hdpi/app_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/user_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/app/src/main/res/drawable-hdpi/user_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/user_icon_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/app/src/main/res/drawable-hdpi/user_icon_selected.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_conversation.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_setting.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 18 | 19 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_chat.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 16 | 17 | 18 | 22 | 23 | 29 | 30 | 31 | 32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_conversation.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_chatroom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 15 | 16 | 24 | 25 | 31 | 32 | 39 | 40 | 41 | 50 | 51 | 60 | 61 | 62 | 70 | 71 | 72 | 73 | 83 | 84 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/navigation/navigation_graph.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 14 | 15 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FEA47F 4 | #F97F51 5 | #2C3A47 6 | #f6f6f6 7 | #e8e8e8 8 | #331D443F 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | WhatsDelete 3 | 4 | Requires Notification Access Permission to continue 5 | Allow 6 | Deny 7 | Exit 8 | No saved messages right now 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/test/java/bot/box/whatsdelete/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package bot.box.whatsdelete 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext.kotlin_version = '1.3.61' 5 | repositories { 6 | google() 7 | jcenter() 8 | 9 | } 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.6.3' 12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 13 | classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.0-alpha05" 14 | // NOTE: Do not place your application dependencies here; they belong 15 | // in the individual module build.gradle files 16 | } 17 | } 18 | 19 | allprojects { 20 | repositories { 21 | google() 22 | jcenter() 23 | 24 | } 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | # Kotlin code style for this project: "official" or "obsolete": 21 | kotlin.code.style=official 22 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheBotBox/WhatsDelete/e092096411fa25e5458cc62141c07c9a31878431/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Apr 27 17:47:28 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /local.properties: -------------------------------------------------------------------------------- 1 | ## This file must *NOT* be checked into Version Control Systems, 2 | # as it contains information specific to your local configuration. 3 | # 4 | # Location of the SDK. This is only used by Gradle. 5 | # For customization when using a Version Control System, please read the 6 | # header note. 7 | #Tue Apr 28 22:57:05 IST 2020 8 | sdk.dir=D\:\\NEW_SDK_LATEST\\AND_SDK\\NEWSDK 9 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | --------------------------------------------------------------------------------