├── .gitignore ├── AppImages ├── icon.png ├── image1.png ├── image2.png ├── image3.png ├── image4.png └── sensorbox_preview.png ├── CountDownDialog ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── motionapps │ │ └── countdowndialog │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── motionapps │ │ │ └── countdowndialog │ │ │ ├── CountDownDialog.kt │ │ │ ├── CountDownInterface.kt │ │ │ ├── CountDownMain.kt │ │ │ └── CountDownStates.kt │ └── res │ │ ├── drawable │ │ ├── rounded_button.xml │ │ └── rounded_white.xml │ │ ├── layout │ │ └── countdown_timer.xml │ │ └── values │ │ ├── colors.xml │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── motionapps │ └── countdowndialog │ └── ExampleUnitTest.kt ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── WearOsLib ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── font │ ├── roboto_family.xml │ └── roboto_regular.ttf ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── motionapps │ │ └── wearoslib │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── motionapps │ │ │ └── wearoslib │ │ │ ├── WearOsConstants.kt │ │ │ ├── WearOsHandler.kt │ │ │ ├── WearOsListener.kt │ │ │ ├── WearOsNotify.kt │ │ │ ├── WearOsStates.kt │ │ │ ├── WearOsStorageHandler.kt │ │ │ ├── WearOsSyncDialog.kt │ │ │ └── WearOsSyncService.kt │ └── res │ │ ├── drawable │ │ ├── ic_baseline_stop.xml │ │ ├── ic_graph.xml │ │ ├── rounded_black.xml │ │ └── rounded_button.xml │ │ ├── font │ │ ├── roboto_family.xml │ │ └── roboto_regular.ttf │ │ ├── layout │ │ └── wearos_sync_dialog.xml │ │ └── values │ │ ├── colors.xml │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── motionapps │ └── wearoslib │ └── ExampleUnitTest.kt ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── motionapps │ │ └── sensorbox │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── motionapps │ │ │ └── sensorbox │ │ │ ├── MsgListener.kt │ │ │ ├── SensorBoxApp.kt │ │ │ ├── activities │ │ │ ├── About.kt │ │ │ ├── MainActivity.kt │ │ │ └── MeasurementActivity.kt │ │ │ ├── di │ │ │ ├── GpsModule.kt │ │ │ ├── MainRepositoryModule.kt │ │ │ └── MeasurementRepositoryModule.kt │ │ │ ├── fragments │ │ │ ├── HomeFragment.kt │ │ │ ├── InfoSensorFragment.kt │ │ │ ├── InfoSensorFragmentWearOs.kt │ │ │ ├── SensorInfoView.kt │ │ │ ├── advanced │ │ │ │ ├── AdvancedFragment.kt │ │ │ │ ├── CountersFragment.kt │ │ │ │ ├── ExtraFragment.kt │ │ │ │ ├── MeasurementPickerFragment.kt │ │ │ │ └── extrahandlers │ │ │ │ │ ├── AlarmHandler.kt │ │ │ │ │ └── NoteHandler.kt │ │ │ ├── displayers │ │ │ │ ├── Displayer.kt │ │ │ │ ├── GPSDisplayer.kt │ │ │ │ ├── SensorDisplayer.kt │ │ │ │ └── SensorWearOsDisplayer.kt │ │ │ └── settings │ │ │ │ ├── AnnotationFragment.kt │ │ │ │ └── SettingsFragment.kt │ │ │ ├── intro │ │ │ ├── IntroActivity.kt │ │ │ ├── PickFolderFragment.kt │ │ │ ├── PolicyFragment.kt │ │ │ ├── PowerSaverExplanationFragment.kt │ │ │ └── PowerSaverFragment.kt │ │ │ ├── permissions │ │ │ ├── PermissionHandler.kt │ │ │ └── PermissionSettingsDialog.kt │ │ │ ├── types │ │ │ ├── SensorAttributes.kt │ │ │ └── SensorResources.kt │ │ │ ├── uiHandlers │ │ │ ├── GraphHandler.kt │ │ │ ├── GraphUpdater.kt │ │ │ ├── SensorViewHandler.kt │ │ │ ├── StorageFunctions.kt │ │ │ └── TextUpdater.kt │ │ │ └── viewmodels │ │ │ ├── MainRepository.kt │ │ │ ├── MainViewModel.kt │ │ │ ├── MeasurementRepository.kt │ │ │ └── MeasurementViewModel.kt │ └── res │ │ ├── drawable │ │ ├── divider.xml │ │ ├── divider_gray.xml │ │ ├── ic_acceleration_icon.xml │ │ ├── ic_accuracy.xml │ │ ├── ic_altitude.xml │ │ ├── ic_android.xml │ │ ├── ic_android_big.xml │ │ ├── ic_android_dark.xml │ │ ├── ic_baseline_add_24.xml │ │ ├── ic_baseline_folder.xml │ │ ├── ic_baseline_gps.xml │ │ ├── ic_baseline_home_24.xml │ │ ├── ic_baseline_location.xml │ │ ├── ic_baseline_run.xml │ │ ├── ic_baseline_settings_24.xml │ │ ├── ic_baseline_storage.xml │ │ ├── ic_battery.xml │ │ ├── ic_bearing.xml │ │ ├── ic_bell.xml │ │ ├── ic_bug.xml │ │ ├── ic_circle.xml │ │ ├── ic_endless_time.xml │ │ ├── ic_folder.xml │ │ ├── ic_github.xml │ │ ├── ic_gps.xml │ │ ├── ic_gravity_icon.xml │ │ ├── ic_gyroscope_icon.xml │ │ ├── ic_heart_rate.xml │ │ ├── ic_incognito.xml │ │ ├── ic_info.xml │ │ ├── ic_latitude.xml │ │ ├── ic_launcher_small_round.xml │ │ ├── ic_launcher_white_round.xml │ │ ├── ic_launcher_white_square.xml │ │ ├── ic_license.xml │ │ ├── ic_light.xml │ │ ├── ic_linear_acceleration_icon.xml │ │ ├── ic_link.xml │ │ ├── ic_long_time.xml │ │ ├── ic_longitude.xml │ │ ├── ic_magnet.xml │ │ ├── ic_mail.xml │ │ ├── ic_maxdelay.xml │ │ ├── ic_maxvalue.xml │ │ ├── ic_menu.xml │ │ ├── ic_mindelay.xml │ │ ├── ic_not_ok.xml │ │ ├── ic_ok.xml │ │ ├── ic_ok_big.xml │ │ ├── ic_pen.xml │ │ ├── ic_policy.xml │ │ ├── ic_power.xml │ │ ├── ic_pressure.xml │ │ ├── ic_provider.xml │ │ ├── ic_proximity.xml │ │ ├── ic_resolution.xml │ │ ├── ic_rotation_icon.xml │ │ ├── ic_short_time.xml │ │ ├── ic_speed.xml │ │ ├── ic_steps.xml │ │ ├── ic_steps_detector.xml │ │ ├── ic_storage.xml │ │ ├── ic_temperature.xml │ │ ├── ic_vendor.xml │ │ ├── ic_version.xml │ │ ├── ic_walk.xml │ │ ├── ic_water_drop.xml │ │ ├── ic_wear_os_download_data.xml │ │ ├── ic_wear_os_off.xml │ │ ├── ic_wear_os_on.xml │ │ ├── rounded_black.xml │ │ ├── rounded_button.xml │ │ ├── rounded_red.xml │ │ ├── rounded_transparent_outline.xml │ │ └── rounded_white.xml │ │ ├── font │ │ ├── roboto_family.xml │ │ └── roboto_regular.ttf │ │ ├── layout-land │ │ ├── activity_measurement_chronometer.xml │ │ ├── activity_measurement_textview.xml │ │ ├── fragment_explanation_power_saver.xml │ │ ├── fragment_info_map.xml │ │ ├── fragment_info_sensor.xml │ │ ├── fragment_info_textview.xml │ │ ├── fragment_measurement_picker.xml │ │ ├── fragment_pick_folder.xml │ │ ├── fragment_policy.xml │ │ └── fragment_power_saver.xml │ │ ├── layout-v24 │ │ └── pref_screen.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── activity_measurement_chronometer.xml │ │ ├── activity_measurement_textview.xml │ │ ├── app_bar_main.xml │ │ ├── content_main.xml │ │ ├── countdown_timer.xml │ │ ├── fragment_annotation.xml │ │ ├── fragment_counters.xml │ │ ├── fragment_explanation_power_saver.xml │ │ ├── fragment_extra.xml │ │ ├── fragment_home.xml │ │ ├── fragment_info_map.xml │ │ ├── fragment_info_sensor.xml │ │ ├── fragment_info_textview.xml │ │ ├── fragment_measurement_picker.xml │ │ ├── fragment_pick_folder.xml │ │ ├── fragment_policy.xml │ │ ├── fragment_power_saver.xml │ │ ├── item_layout_annotation.xml │ │ ├── item_layout_sensorrow.xml │ │ ├── item_layout_sensorrow_info.xml │ │ ├── nav_header_main.xml │ │ ├── pref_category.xml │ │ ├── pref_preference.xml │ │ ├── pref_screen.xml │ │ ├── template_double_picker.xml │ │ └── template_picker.xml │ │ ├── menu │ │ ├── activity_main_drawer.xml │ │ └── main.xml │ │ ├── mipmap │ │ └── ic_icon_square.png │ │ ├── navigation │ │ └── mobile_navigation.xml │ │ ├── raw │ │ └── notices.xml │ │ ├── values │ │ ├── arrays.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── drawables.xml │ │ ├── strings.xml │ │ ├── styles.xml │ │ └── wear.xml │ │ └── xml │ │ ├── backup_descriptor.xml │ │ ├── data_extraction_rules.xml │ │ ├── media_capabilities.xml │ │ └── root_preferences.xml │ └── test │ └── java │ └── com │ └── motionapps │ └── sensorbox │ └── ExampleUnitTest.kt ├── build.gradle ├── fastlane ├── Fastfile ├── Pluginfile ├── README.md ├── metadata │ └── android │ │ └── en-GB │ │ ├── changelogs │ │ ├── 1000026.txt │ │ └── 65.txt │ │ ├── full_description.txt │ │ ├── images │ │ ├── featureGraphic.png │ │ ├── icon.png │ │ ├── phoneScreenshots │ │ │ ├── 1_en-GB.png │ │ │ ├── 2_en-GB.png │ │ │ ├── 3_en-GB.png │ │ │ └── 4_en-GB.png │ │ └── wearScreenshots │ │ │ ├── 1_en-GB.png │ │ │ └── 2_en-GB.png │ │ ├── short_description.txt │ │ ├── title.txt │ │ └── video.txt └── report.xml ├── flipper ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── balda │ └── flipper │ ├── DocumentFileCompat.java │ ├── FileDescription.java │ ├── FileUtils.java │ ├── MediaStoreCompat.java │ ├── MediaStoreCompatException.java │ ├── OperationFailedException.java │ ├── Root.java │ └── StorageManagerCompat.java ├── gradle.properties ├── gradle └── wrapper │ └── gradle-wrapper.properties ├── sensorservices ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── motionapps │ │ └── sensorservices │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── motionapps │ │ │ └── sensorservices │ │ │ ├── handlers │ │ │ ├── GPSHandler.kt │ │ │ ├── PoweManagement.kt │ │ │ ├── StorageHandler.kt │ │ │ └── measurements │ │ │ │ ├── ActivityRecognition.kt │ │ │ │ ├── AlarmNoiseHandler.kt │ │ │ │ ├── ExtraInfoHandler.kt │ │ │ │ ├── GPSMeasurement.kt │ │ │ │ ├── MeasurementInterface.kt │ │ │ │ ├── SensorMeasurement.kt │ │ │ │ └── SignificantMotion.kt │ │ │ ├── serviceController │ │ │ └── ServiceController.kt │ │ │ ├── services │ │ │ ├── MeasurementService.kt │ │ │ ├── MeasurementStates.kt │ │ │ └── Notify.kt │ │ │ └── types │ │ │ ├── EndHolder.kt │ │ │ ├── SensorHolder.kt │ │ │ └── SensorsNeeds.kt │ └── res │ │ ├── drawable │ │ ├── ic_graph.xml │ │ └── ic_stop.xml │ │ ├── raw │ │ ├── alert.wav │ │ ├── beep.wav │ │ ├── end.wav │ │ └── start.wav │ │ ├── values-v34 │ │ └── strings.xml │ │ └── values │ │ ├── colors.xml │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── motionapps │ └── sensorservices │ └── ExampleUnitTest.kt ├── settings.gradle └── wear ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src ├── androidTest └── java │ └── com │ └── motionapps │ └── sensorbox │ └── ExampleInstrumentedTest.kt ├── main ├── AndroidManifest.xml ├── java │ └── com │ │ └── motionapps │ │ └── sensorbox │ │ ├── activities │ │ ├── MainActivity.kt │ │ ├── MainSettings.kt │ │ ├── MapsActivity.kt │ │ ├── MoveToMain.kt │ │ ├── PermissionActivity.kt │ │ ├── PermissionActivityForResult.kt │ │ ├── PickSensorMeasure.kt │ │ ├── PickSensorShow.kt │ │ ├── SettingsPicker.kt │ │ └── StopActivity.kt │ │ ├── adapters │ │ ├── MainActivityAdapter.kt │ │ ├── SensorBasicAdapter.kt │ │ ├── SensorPickerAdapter.kt │ │ ├── SettingsAdapter.kt │ │ └── SettingsPickerAdapter.kt │ │ ├── charts │ │ ├── GraphHandler.kt │ │ └── GraphViewer.kt │ │ ├── communication │ │ ├── DataSync.kt │ │ ├── MsgListener.kt │ │ └── SensorTools.kt │ │ └── rlRecording │ │ └── RealTimeSensorService.kt └── res │ ├── drawable │ ├── ic_archive.xml │ ├── ic_baseline_location.xml │ ├── ic_baseline_timer.xml │ ├── ic_battery_full.xml │ ├── ic_brightness.xml │ ├── ic_cancel.xml │ ├── ic_check_circle.xml │ ├── ic_cpu.xml │ ├── ic_incognito.xml │ ├── ic_info.xml │ ├── ic_info_outline.xml │ ├── ic_launcher_white_square.xml │ ├── ic_policy.xml │ ├── ic_poll.xml │ ├── ic_sampling.xml │ ├── ic_save_green.xml │ ├── ic_save_red.xml │ └── rounded_white.xml │ ├── layout │ ├── activity_graph_viewer.xml │ ├── activity_main.xml │ ├── activity_maps.xml │ ├── activity_permission.xml │ ├── activity_pick_sensor.xml │ ├── activity_pick_sensor_measure.xml │ ├── activity_settings.xml │ ├── activity_settings_picker.xml │ ├── button_layout_menu.xml │ ├── button_picksensor_row.xml │ ├── button_picksensor_start.xml │ ├── button_settings.xml │ ├── move_to_main.xml │ ├── sensor_text_row.xml │ ├── settings_sampling_row.xml │ └── stop_activity.xml │ ├── values │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ ├── styles.xml │ └── wear.xml │ └── xml │ └── media_capabilities.xml ├── release └── res │ └── values │ └── google_maps_api.xml └── test └── java └── com └── motionapps └── sensorbox └── ExampleUnitTest.kt /.gitignore: -------------------------------------------------------------------------------- 1 | /local.properties 2 | /.gradle/ 3 | /.idea/ 4 | /app/*.json 5 | /wear/*.json 6 | -------------------------------------------------------------------------------- /AppImages/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foxpace/SensorBox/3d96414bd41822da147a7f42dbd68ee0172e0f59/AppImages/icon.png -------------------------------------------------------------------------------- /AppImages/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foxpace/SensorBox/3d96414bd41822da147a7f42dbd68ee0172e0f59/AppImages/image1.png -------------------------------------------------------------------------------- /AppImages/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foxpace/SensorBox/3d96414bd41822da147a7f42dbd68ee0172e0f59/AppImages/image2.png -------------------------------------------------------------------------------- /AppImages/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foxpace/SensorBox/3d96414bd41822da147a7f42dbd68ee0172e0f59/AppImages/image3.png -------------------------------------------------------------------------------- /AppImages/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foxpace/SensorBox/3d96414bd41822da147a7f42dbd68ee0172e0f59/AppImages/image4.png -------------------------------------------------------------------------------- /AppImages/sensorbox_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foxpace/SensorBox/3d96414bd41822da147a7f42dbd68ee0172e0f59/AppImages/sensorbox_preview.png -------------------------------------------------------------------------------- /CountDownDialog/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /CountDownDialog/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | 4 | android { 5 | compileSdk 34 6 | 7 | defaultConfig { 8 | minSdkVersion 19 9 | targetSdkVersion 34 10 | multiDexEnabled true 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | consumerProguardFiles "consumer-rules.pro" 13 | } 14 | 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 19 | } 20 | nfrelease{ 21 | initWith release 22 | } 23 | } 24 | compileOptions { 25 | sourceCompatibility JavaVersion.VERSION_17 26 | targetCompatibility JavaVersion.VERSION_17 27 | } 28 | kotlinOptions { 29 | jvmTarget = JavaVersion.VERSION_17 30 | } 31 | namespace 'com.motionapps.countdowndialog' 32 | } 33 | 34 | dependencies { 35 | implementation fileTree(dir: "libs", include: ["*.jar"]) 36 | implementation "androidx.multidex:multidex:2.0.1" 37 | implementation 'androidx.core:core-ktx:1.12.0' 38 | implementation 'androidx.appcompat:appcompat:1.6.1' 39 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4' 40 | implementation 'com.google.android.material:material:1.11.0' 41 | implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7' 42 | implementation 'androidx.navigation:navigation-ui-ktx:2.7.7' 43 | implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' 44 | implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7' 45 | implementation 'androidx.navigation:navigation-ui-ktx:2.7.7' 46 | testImplementation 'junit:junit:4.13.2' 47 | androidTestImplementation 'androidx.test.ext:junit:1.1.5' 48 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' 49 | 50 | } -------------------------------------------------------------------------------- /CountDownDialog/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Foxpace/SensorBox/3d96414bd41822da147a7f42dbd68ee0172e0f59/CountDownDialog/consumer-rules.pro -------------------------------------------------------------------------------- /CountDownDialog/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 -------------------------------------------------------------------------------- /CountDownDialog/src/androidTest/java/com/motionapps/countdowndialog/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.motionapps.countdowndialog 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("com.motionapps.countdowndialog.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /CountDownDialog/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /CountDownDialog/src/main/java/com/motionapps/countdowndialog/CountDownDialog.kt: -------------------------------------------------------------------------------- 1 | package com.motionapps.countdowndialog 2 | 3 | import android.app.Dialog 4 | import android.content.Context 5 | import android.os.Bundle 6 | import android.view.Window 7 | 8 | /** 9 | * Dialog composes of textView, where the seconds left are shown 10 | * CountDown can be canceled by cancel button in the dialog 11 | * @param context 12 | */ 13 | class CountDownDialog(context: Context) : Dialog(context) { 14 | 15 | override fun onCreate(savedInstanceState: Bundle?) { 16 | super.onCreate(savedInstanceState) 17 | requestWindowFeature(Window.FEATURE_NO_TITLE) 18 | window?.setBackgroundDrawableResource(android.R.color.transparent) 19 | setContentView(R.layout.countdown_timer) 20 | setCancelable(false) 21 | setCanceledOnTouchOutside(false) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /CountDownDialog/src/main/java/com/motionapps/countdowndialog/CountDownInterface.kt: -------------------------------------------------------------------------------- 1 | package com.motionapps.countdowndialog 2 | 3 | /** 4 | * interface for the other components to implement 5 | * refresh interval is 100 ms, but only whole seconds are passed 6 | */ 7 | interface CountDownInterface { 8 | fun onTick(seconds: String) 9 | fun onCountDownEnd() 10 | } -------------------------------------------------------------------------------- /CountDownDialog/src/main/java/com/motionapps/countdowndialog/CountDownStates.kt: -------------------------------------------------------------------------------- 1 | package com.motionapps.countdowndialog 2 | 3 | /** 4 | * CountDown states, which can be used for own use 5 | * 6 | */ 7 | sealed class CountDownStates { 8 | 9 | class OnTick(val tick: String): CountDownStates() 10 | object OnCancel: CountDownStates() 11 | object OnNothing: CountDownStates() 12 | object OnFinish: CountDownStates() 13 | 14 | } -------------------------------------------------------------------------------- /CountDownDialog/src/main/res/drawable/rounded_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CountDownDialog/src/main/res/drawable/rounded_white.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /CountDownDialog/src/main/res/layout/countdown_timer.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 24 | 25 |