├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── drawables.xml
│ │ │ │ ├── arrays.xml
│ │ │ │ ├── wear.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ └── colors.xml
│ │ │ ├── font
│ │ │ │ ├── roboto_regular.ttf
│ │ │ │ └── roboto_family.xml
│ │ │ ├── mipmap
│ │ │ │ └── ic_icon_square.png
│ │ │ ├── xml
│ │ │ │ ├── data_extraction_rules.xml
│ │ │ │ ├── backup_descriptor.xml
│ │ │ │ └── media_capabilities.xml
│ │ │ ├── drawable
│ │ │ │ ├── divider.xml
│ │ │ │ ├── divider_gray.xml
│ │ │ │ ├── rounded_black.xml
│ │ │ │ ├── rounded_red.xml
│ │ │ │ ├── rounded_white.xml
│ │ │ │ ├── rounded_button.xml
│ │ │ │ ├── ic_menu.xml
│ │ │ │ ├── ic_baseline_add_24.xml
│ │ │ │ ├── rounded_transparent_outline.xml
│ │ │ │ ├── ic_baseline_folder.xml
│ │ │ │ ├── ic_baseline_home_24.xml
│ │ │ │ ├── ic_baseline_storage.xml
│ │ │ │ ├── ic_storage.xml
│ │ │ │ ├── ic_circle.xml
│ │ │ │ ├── ic_pen.xml
│ │ │ │ ├── ic_baseline_location.xml
│ │ │ │ ├── ic_walk.xml
│ │ │ │ ├── ic_power.xml
│ │ │ │ ├── ic_version.xml
│ │ │ │ ├── ic_baseline_run.xml
│ │ │ │ ├── ic_ok.xml
│ │ │ │ ├── ic_baseline_gps.xml
│ │ │ │ ├── ic_ok_big.xml
│ │ │ │ ├── ic_altitude.xml
│ │ │ │ ├── ic_info.xml
│ │ │ │ ├── ic_android.xml
│ │ │ │ ├── ic_android_dark.xml
│ │ │ │ ├── ic_android_big.xml
│ │ │ │ ├── ic_github.xml
│ │ │ │ ├── ic_not_ok.xml
│ │ │ │ ├── ic_bell.xml
│ │ │ │ ├── ic_folder.xml
│ │ │ │ ├── ic_mail.xml
│ │ │ │ ├── ic_heart_rate.xml
│ │ │ │ ├── ic_battery.xml
│ │ │ │ ├── ic_water_drop.xml
│ │ │ │ ├── ic_link.xml
│ │ │ │ ├── ic_license.xml
│ │ │ │ ├── ic_vendor.xml
│ │ │ │ ├── ic_policy.xml
│ │ │ │ ├── ic_acceleration_icon.xml
│ │ │ │ ├── ic_provider.xml
│ │ │ │ ├── ic_gps.xml
│ │ │ │ ├── ic_maxdelay.xml
│ │ │ │ ├── ic_mindelay.xml
│ │ │ │ ├── ic_gravity_icon.xml
│ │ │ │ ├── ic_baseline_settings_24.xml
│ │ │ │ ├── ic_incognito.xml
│ │ │ │ ├── ic_short_time.xml
│ │ │ │ ├── ic_magnet.xml
│ │ │ │ ├── ic_proximity.xml
│ │ │ │ ├── ic_maxvalue.xml
│ │ │ │ ├── ic_gyroscope_icon.xml
│ │ │ │ ├── ic_linear_acceleration_icon.xml
│ │ │ │ ├── ic_rotation_icon.xml
│ │ │ │ ├── ic_steps.xml
│ │ │ │ ├── ic_latitude.xml
│ │ │ │ ├── ic_longitude.xml
│ │ │ │ ├── ic_resolution.xml
│ │ │ │ ├── ic_wear_os_off.xml
│ │ │ │ ├── ic_wear_os_on.xml
│ │ │ │ ├── ic_endless_time.xml
│ │ │ │ ├── ic_pressure.xml
│ │ │ │ └── ic_long_time.xml
│ │ │ ├── layout-v24
│ │ │ │ └── pref_screen.xml
│ │ │ ├── layout
│ │ │ │ ├── pref_screen.xml
│ │ │ │ ├── content_main.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── app_bar_main.xml
│ │ │ │ ├── nav_header_main.xml
│ │ │ │ ├── countdown_timer.xml
│ │ │ │ ├── pref_category.xml
│ │ │ │ ├── fragment_home.xml
│ │ │ │ ├── fragment_info_sensor.xml
│ │ │ │ ├── item_layout_annotation.xml
│ │ │ │ └── fragment_info_map.xml
│ │ │ ├── menu
│ │ │ │ ├── main.xml
│ │ │ │ └── activity_main_drawer.xml
│ │ │ └── layout-land
│ │ │ │ ├── fragment_info_sensor.xml
│ │ │ │ └── fragment_info_map.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── motionapps
│ │ │ └── sensorbox
│ │ │ ├── fragments
│ │ │ ├── SensorInfoView.kt
│ │ │ ├── displayers
│ │ │ │ └── Displayer.kt
│ │ │ ├── InfoSensorFragmentWearOs.kt
│ │ │ ├── InfoSensorFragment.kt
│ │ │ └── advanced
│ │ │ │ ├── AdvancedFragment.kt
│ │ │ │ └── MeasurementPickerFragment.kt
│ │ │ ├── viewmodels
│ │ │ ├── MeasurementRepository.kt
│ │ │ └── MainRepository.kt
│ │ │ ├── SensorBoxApp.kt
│ │ │ ├── intro
│ │ │ ├── PowerSaverExplanationFragment.kt
│ │ │ └── PowerSaverFragment.kt
│ │ │ ├── di
│ │ │ ├── MeasurementRepositoryModule.kt
│ │ │ └── GpsModule.kt
│ │ │ ├── uiHandlers
│ │ │ └── TextUpdater.kt
│ │ │ └── types
│ │ │ └── SensorResources.kt
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── motionapps
│ │ │ └── sensorbox
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── motionapps
│ │ └── sensorbox
│ │ └── ExampleInstrumentedTest.kt
└── proguard-rules.pro
├── wear
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── wear.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── styles.xml
│ │ │ │ └── dimens.xml
│ │ │ ├── drawable
│ │ │ │ ├── rounded_white.xml
│ │ │ │ ├── ic_check_circle.xml
│ │ │ │ ├── ic_battery_full.xml
│ │ │ │ ├── ic_poll.xml
│ │ │ │ ├── ic_save_red.xml
│ │ │ │ ├── ic_info.xml
│ │ │ │ ├── ic_save_green.xml
│ │ │ │ ├── ic_info_outline.xml
│ │ │ │ ├── ic_archive.xml
│ │ │ │ ├── ic_baseline_timer.xml
│ │ │ │ ├── ic_baseline_location.xml
│ │ │ │ ├── ic_cancel.xml
│ │ │ │ ├── ic_sampling.xml
│ │ │ │ ├── ic_policy.xml
│ │ │ │ ├── ic_incognito.xml
│ │ │ │ └── ic_brightness.xml
│ │ │ ├── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── activity_settings.xml
│ │ │ │ ├── activity_settings_picker.xml
│ │ │ │ ├── button_picksensor_start.xml
│ │ │ │ ├── activity_graph_viewer.xml
│ │ │ │ ├── activity_maps.xml
│ │ │ │ ├── stop_activity.xml
│ │ │ │ ├── sensor_text_row.xml
│ │ │ │ ├── button_layout_menu.xml
│ │ │ │ ├── activity_pick_sensor.xml
│ │ │ │ ├── activity_pick_sensor_measure.xml
│ │ │ │ └── settings_sampling_row.xml
│ │ │ └── xml
│ │ │ │ └── media_capabilities.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── motionapps
│ │ │ └── sensorbox
│ │ │ └── activities
│ │ │ └── SettingsPicker.kt
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── motionapps
│ │ │ └── sensorbox
│ │ │ └── ExampleUnitTest.kt
│ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── motionapps
│ │ │ └── sensorbox
│ │ │ └── ExampleInstrumentedTest.kt
│ └── release
│ │ └── res
│ │ └── values
│ │ └── google_maps_api.xml
└── proguard-rules.pro
├── WearOsLib
├── .gitignore
├── consumer-rules.pro
├── font
│ ├── roboto_regular.ttf
│ └── roboto_family.xml
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── font
│ │ │ │ ├── roboto_regular.ttf
│ │ │ │ └── roboto_family.xml
│ │ │ ├── values
│ │ │ │ ├── colors.xml
│ │ │ │ └── strings.xml
│ │ │ └── drawable
│ │ │ │ ├── rounded_black.xml
│ │ │ │ ├── rounded_button.xml
│ │ │ │ ├── ic_baseline_stop.xml
│ │ │ │ └── ic_graph.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── motionapps
│ │ │ │ └── wearoslib
│ │ │ │ ├── WearOsListener.kt
│ │ │ │ ├── WearOsStates.kt
│ │ │ │ └── WearOsConstants.kt
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── motionapps
│ │ │ └── wearoslib
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── motionapps
│ │ └── wearoslib
│ │ └── ExampleInstrumentedTest.kt
├── proguard-rules.pro
└── build.gradle
├── CountDownDialog
├── .gitignore
├── consumer-rules.pro
├── src
│ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── colors.xml
│ │ │ ├── drawable
│ │ │ │ ├── rounded_white.xml
│ │ │ │ └── rounded_button.xml
│ │ │ └── layout
│ │ │ │ └── countdown_timer.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── motionapps
│ │ │ └── countdowndialog
│ │ │ ├── CountDownInterface.kt
│ │ │ ├── CountDownStates.kt
│ │ │ └── CountDownDialog.kt
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── motionapps
│ │ │ └── countdowndialog
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── motionapps
│ │ └── countdowndialog
│ │ └── ExampleInstrumentedTest.kt
├── proguard-rules.pro
└── build.gradle
├── flipper
├── .gitignore
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ └── com
│ │ └── balda
│ │ └── flipper
│ │ ├── OperationFailedException.java
│ │ └── MediaStoreCompatException.java
├── proguard-rules.pro
└── build.gradle
├── sensorservices
├── .gitignore
├── consumer-rules.pro
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── raw
│ │ │ │ ├── beep.wav
│ │ │ │ ├── end.wav
│ │ │ │ ├── alert.wav
│ │ │ │ └── start.wav
│ │ │ ├── values
│ │ │ │ ├── colors.xml
│ │ │ │ └── strings.xml
│ │ │ ├── drawable
│ │ │ │ ├── ic_stop.xml
│ │ │ │ └── ic_graph.xml
│ │ │ └── values-v34
│ │ │ │ └── strings.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── motionapps
│ │ │ │ └── sensorservices
│ │ │ │ ├── types
│ │ │ │ └── EndHolder.kt
│ │ │ │ ├── services
│ │ │ │ └── MeasurementStates.kt
│ │ │ │ └── handlers
│ │ │ │ ├── measurements
│ │ │ │ └── MeasurementInterface.kt
│ │ │ │ └── PoweManagement.kt
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── motionapps
│ │ │ └── sensorservices
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── motionapps
│ │ └── sensorservices
│ │ └── ExampleInstrumentedTest.kt
├── proguard-rules.pro
└── build.gradle
├── fastlane
├── metadata
│ └── android
│ │ └── en-GB
│ │ ├── video.txt
│ │ ├── title.txt
│ │ ├── changelogs
│ │ ├── 65.txt
│ │ └── 1000026.txt
│ │ ├── short_description.txt
│ │ ├── images
│ │ ├── icon.png
│ │ ├── featureGraphic.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
│ │ └── full_description.txt
├── Pluginfile
├── README.md
├── report.xml
└── Fastfile
├── .gitignore
├── AppImages
├── icon.png
├── image1.png
├── image2.png
├── image3.png
├── image4.png
└── sensorbox_preview.png
├── settings.gradle
├── Gemfile
├── gradle
└── wrapper
│ └── gradle-wrapper.properties
└── gradle.properties
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/wear/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/WearOsLib/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/WearOsLib/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CountDownDialog/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/flipper/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/sensorservices/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/sensorservices/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CountDownDialog/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-GB/video.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/res/values/drawables.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-GB/title.txt:
--------------------------------------------------------------------------------
1 | SensorBox
--------------------------------------------------------------------------------
/flipper/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-GB/changelogs/65.txt:
--------------------------------------------------------------------------------
1 | Minor bug fixes.
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-GB/changelogs/1000026.txt:
--------------------------------------------------------------------------------
1 | Minor bug fixes.
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /local.properties
2 | /.gradle/
3 | /.idea/
4 | /app/*.json
5 | /wear/*.json
6 |
--------------------------------------------------------------------------------
/AppImages/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/AppImages/icon.png
--------------------------------------------------------------------------------
/AppImages/image1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/AppImages/image1.png
--------------------------------------------------------------------------------
/AppImages/image2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/AppImages/image2.png
--------------------------------------------------------------------------------
/AppImages/image3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/AppImages/image3.png
--------------------------------------------------------------------------------
/AppImages/image4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/AppImages/image4.png
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-GB/short_description.txt:
--------------------------------------------------------------------------------
1 | Log data from all sensors in your phone with annotations.
--------------------------------------------------------------------------------
/AppImages/sensorbox_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/AppImages/sensorbox_preview.png
--------------------------------------------------------------------------------
/WearOsLib/font/roboto_regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/WearOsLib/font/roboto_regular.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/roboto_regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/app/src/main/res/font/roboto_regular.ttf
--------------------------------------------------------------------------------
/sensorservices/src/main/res/raw/beep.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/sensorservices/src/main/res/raw/beep.wav
--------------------------------------------------------------------------------
/sensorservices/src/main/res/raw/end.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/sensorservices/src/main/res/raw/end.wav
--------------------------------------------------------------------------------
/app/src/main/res/mipmap/ic_icon_square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/app/src/main/res/mipmap/ic_icon_square.png
--------------------------------------------------------------------------------
/sensorservices/src/main/res/raw/alert.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/sensorservices/src/main/res/raw/alert.wav
--------------------------------------------------------------------------------
/sensorservices/src/main/res/raw/start.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/sensorservices/src/main/res/raw/start.wav
--------------------------------------------------------------------------------
/WearOsLib/src/main/res/font/roboto_regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/WearOsLib/src/main/res/font/roboto_regular.ttf
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-GB/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/fastlane/metadata/android/en-GB/images/icon.png
--------------------------------------------------------------------------------
/CountDownDialog/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/fastlane/Pluginfile:
--------------------------------------------------------------------------------
1 | # Autogenerated by fastlane
2 | #
3 | # Ensure this file is checked in to source control!
4 |
5 | gem 'fastlane-plugin-increment_version_code'
6 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-GB/images/featureGraphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/fastlane/metadata/android/en-GB/images/featureGraphic.png
--------------------------------------------------------------------------------
/sensorservices/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #000000
4 |
--------------------------------------------------------------------------------
/CountDownDialog/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Cancel
4 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-GB/images/phoneScreenshots/1_en-GB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/fastlane/metadata/android/en-GB/images/phoneScreenshots/1_en-GB.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-GB/images/phoneScreenshots/2_en-GB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/fastlane/metadata/android/en-GB/images/phoneScreenshots/2_en-GB.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-GB/images/phoneScreenshots/3_en-GB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/fastlane/metadata/android/en-GB/images/phoneScreenshots/3_en-GB.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-GB/images/phoneScreenshots/4_en-GB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/fastlane/metadata/android/en-GB/images/phoneScreenshots/4_en-GB.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-GB/images/wearScreenshots/1_en-GB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/fastlane/metadata/android/en-GB/images/wearScreenshots/1_en-GB.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-GB/images/wearScreenshots/2_en-GB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Foxpace/SensorBox/HEAD/fastlane/metadata/android/en-GB/images/wearScreenshots/2_en-GB.png
--------------------------------------------------------------------------------
/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':flipper'
2 | include ':wearoslib'
3 | include ':wear'
4 | include ':CountDownDialog'
5 | include ':SensorServices'
6 | include ':app'
7 | rootProject.name = "SensorBox"
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | gem "fastlane"
4 | plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
5 | eval_gemfile(plugins_path) if File.exist?(plugins_path)
6 |
--------------------------------------------------------------------------------
/WearOsLib/src/main/java/com/motionapps/wearoslib/WearOsListener.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.wearoslib
2 |
3 | interface WearOsListener {
4 |
5 | suspend fun onWearOsStates(wearOsStates: WearOsStates)
6 |
7 | }
--------------------------------------------------------------------------------
/CountDownDialog/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #000000
4 | #FFFFFF
5 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/backup_descriptor.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/divider.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/wear.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - phone_app
5 |
6 |
--------------------------------------------------------------------------------
/wear/src/main/res/values/wear.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - wear_app
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/divider_gray.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/WearOsLib/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #00000000
4 | #FFFFFF
5 | #000000
6 |
--------------------------------------------------------------------------------
/wear/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #00000000
4 | #ff0000
5 | #000000
6 |
--------------------------------------------------------------------------------
/sensorservices/src/main/java/com/motionapps/sensorservices/types/EndHolder.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorservices.types
2 |
3 | /**
4 | * if there would be more holders, everyone must implements save method
5 | *
6 | */
7 | interface EndHolder {
8 | suspend fun saveFile()
9 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rounded_black.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Sep 25 17:14:36 CEST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/WearOsLib/src/main/res/drawable/rounded_black.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/WearOsLib/font/roboto_family.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rounded_red.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rounded_white.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rounded_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/sensorservices/src/main/res/drawable/ic_stop.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CountDownDialog/src/main/res/drawable/rounded_white.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/WearOsLib/src/main/res/drawable/rounded_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/WearOsLib/src/main/res/drawable/ic_baseline_stop.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CountDownDialog/src/main/res/drawable/rounded_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 8dp
6 | 176dp
7 |
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/WearOsLib/src/main/res/drawable/ic_graph.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/java/com/motionapps/sensorbox/fragments/SensorInfoView.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorbox.fragments
2 |
3 | /**
4 | * Stores data for the line of the sensor attribute
5 | *
6 | * @property title - of the attribute
7 | * @property value - of the attribut
8 | * @property icon - of the attribut
9 | */
10 | data class SensorInfoView(val title: String, val value: String, val icon: Int)
--------------------------------------------------------------------------------
/sensorservices/src/main/res/drawable/ic_graph.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/rounded_white.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/sensorservices/src/main/java/com/motionapps/sensorservices/services/MeasurementStates.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorservices.services
2 |
3 | sealed class MeasurementStates {
4 |
5 | class OnTick(val tick: Int): MeasurementStates()
6 | object OnShortEnd: MeasurementStates()
7 | object StateNothing : MeasurementStates()
8 | class OnEndMeasurement(val type: Int, val repeat: Boolean): MeasurementStates()
9 | }
--------------------------------------------------------------------------------
/wear/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/font/roboto_family.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/WearOsLib/src/main/res/font/roboto_family.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_add_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rounded_transparent_outline.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_folder.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_home_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/wear/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_storage.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_check_circle.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_battery_full.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/wear/src/main/res/layout/activity_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_storage.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/WearOsLib/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_circle.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
12 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_poll.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/test/java/com/motionapps/sensorbox/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorbox
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 | }
--------------------------------------------------------------------------------
/wear/src/test/java/com/motionapps/sensorbox/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorbox
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 | }
--------------------------------------------------------------------------------
/WearOsLib/src/test/java/com/motionapps/wearoslib/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.wearoslib
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 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_pen.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_save_red.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_info.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_save_green.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/sensorservices/src/test/java/com/motionapps/sensorservices/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorservices
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 | }
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_info_outline.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CountDownDialog/src/test/java/com/motionapps/countdowndialog/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.countdowndialog
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 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_location.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/media_capabilities.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/wear/src/main/res/xml/media_capabilities.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/WearOsLib/src/main/java/com/motionapps/wearoslib/WearOsStates.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.wearoslib
2 |
3 | sealed class WearOsStates {
4 | class PresenceResult(val present: Boolean): WearOsStates() // if the Wear Os is present
5 | // Memory status
6 | class Status(val running: Boolean, val measurementsToSync: Int, val sizeOfData: Double, val totalNumberOfFiles: Int ): WearOsStates()
7 | // to turn off Wear Os
8 | object Offline: WearOsStates()
9 | // waiting for the result
10 | object AwaitResult: WearOsStates()
11 | }
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #111111
4 | #222222
5 | #AAAAAA
6 | #FFFFFF
7 | #FFFFFF
8 | #F94144
9 | #000000
10 | #00000000
11 | #7192BE
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_walk.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/java/com/motionapps/sensorbox/fragments/displayers/Displayer.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorbox.fragments.displayers
2 |
3 | import android.content.Context
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import androidx.navigation.NavArgs
8 |
9 | /**
10 | * Interface for objects, that want to shoe sensor or other attributes of it
11 | */
12 | interface Displayer {
13 | fun getView(context: Context, inflater: LayoutInflater, viewGroup: ViewGroup?, args: NavArgs): View?
14 | fun onDestroy()
15 | }
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_archive.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_power.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_baseline_timer.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/flipper/src/main/java/com/balda/flipper/OperationFailedException.java:
--------------------------------------------------------------------------------
1 | package com.balda.flipper;
2 |
3 | @SuppressWarnings("unused")
4 | public class OperationFailedException extends RuntimeException {
5 | public OperationFailedException() {
6 | super();
7 | }
8 |
9 | public OperationFailedException(String message) {
10 | super(message);
11 | }
12 |
13 | public OperationFailedException(String message, Throwable cause) {
14 | super(message, cause);
15 | }
16 |
17 | public OperationFailedException(Throwable cause) {
18 | super(cause);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_version.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/WearOsLib/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | SensorBox
4 | Restart connection please
5 | Syncing Wear Os data
6 | Stop
7 |
8 | Measurements:
9 | Wear Os measurement synchronization
10 | Total size:
11 | Synchronize
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_run.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_ok.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_gps.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_ok_big.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_altitude.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_baseline_location.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_info.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_android.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/motionapps/sensorbox/viewmodels/MeasurementRepository.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorbox.viewmodels
2 |
3 | import com.motionapps.countdowndialog.CountDownMain
4 | import com.motionapps.sensorbox.uiHandlers.GraphUpdater
5 | import com.motionapps.wearoslib.WearOsHandler
6 |
7 | /**
8 | * Used by MeasurementActivity's ViewModel
9 | * @property countDownMain - handles countdown
10 | * @property graphUpdater - updates chart
11 | * @property wearOsHandler - handles Wear Os responses
12 | */
13 | class MeasurementRepository(
14 | val countDownMain: CountDownMain,
15 | val graphUpdater: GraphUpdater,
16 | val wearOsHandler: WearOsHandler
17 | )
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_android_dark.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_android_big.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/wear/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 0dp
8 |
9 |
14 | 16dp
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/motionapps/sensorbox/SensorBoxApp.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorbox
2 |
3 | import android.app.Application
4 | import android.content.Context
5 | import android.os.Build
6 | import androidx.multidex.MultiDex
7 | import dagger.hilt.android.HiltAndroidApp
8 |
9 | /**
10 | * building block for the Hilt dependency injection framework
11 | *
12 | */
13 | @HiltAndroidApp
14 | class SensorBoxApp: Application(){
15 |
16 | override fun attachBaseContext(context: Context?) {
17 | super.attachBaseContext(context)
18 | if(Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP){
19 | MultiDex.install(this)
20 | }
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout-v24/pref_screen.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_cancel.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/wear/src/main/res/layout/activity_settings_picker.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_github.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_not_ok.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_bell.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/pref_screen.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_folder.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_mail.xml:
--------------------------------------------------------------------------------
1 |
6 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/motionapps/sensorbox/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorbox
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.sensorbox", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/wear/src/androidTest/java/com/motionapps/sensorbox/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorbox
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 | import com.motionapps.sensorbox.communication.DataSync
6 |
7 | import org.junit.Test
8 | import org.junit.runner.RunWith
9 |
10 | /**
11 | * Instrumented test, which will execute on an Android device.
12 | *
13 | * See [testing documentation](http://d.android.com/tools/testing).
14 | */
15 | @RunWith(AndroidJUnit4::class)
16 | class ExampleInstrumentedTest {
17 | @Test
18 | fun useAppContext() {
19 | // Context of the app under test.
20 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
21 |
22 | DataSync.dataAvailable(appContext)
23 | }
24 | }
--------------------------------------------------------------------------------
/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
--------------------------------------------------------------------------------
/WearOsLib/src/androidTest/java/com/motionapps/wearoslib/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.wearoslib
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.wearoslib.test", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/wear/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
--------------------------------------------------------------------------------
/WearOsLib/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
--------------------------------------------------------------------------------
/flipper/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 |
--------------------------------------------------------------------------------
/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
--------------------------------------------------------------------------------
/sensorservices/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
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_heart_rate.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
12 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_sampling.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/sensorservices/src/androidTest/java/com/motionapps/sensorservices/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorservices
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.sensorservices.test", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/wear/src/release/res/values/google_maps_api.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 | YOUR_KEY_HERE
20 |
--------------------------------------------------------------------------------
/flipper/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdk 34
5 |
6 |
7 | defaultConfig {
8 | minSdkVersion 19
9 | targetSdkVersion 34
10 | }
11 |
12 | buildTypes {
13 | release {
14 | minifyEnabled false
15 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
16 | }
17 | nfrelease{
18 | initWith release
19 | }
20 | }
21 |
22 | compileOptions {
23 | sourceCompatibility JavaVersion.VERSION_17
24 | targetCompatibility JavaVersion.VERSION_17
25 | }
26 |
27 | namespace 'com.balda.flipper'
28 |
29 | }
30 |
31 | dependencies {
32 | implementation fileTree(dir: 'libs', include: ['*.jar'])
33 | implementation 'androidx.appcompat:appcompat:1.6.1'
34 | implementation 'androidx.preference:preference:1.2.1'
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sensorservices/src/main/java/com/motionapps/sensorservices/handlers/measurements/MeasurementInterface.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorservices.handlers.measurements
2 |
3 | import android.content.Context
4 | import android.os.Bundle
5 |
6 | /**
7 | * basic methods, which handlers have to call them at once with service lifecycle events
8 | *
9 | */
10 | interface MeasurementInterface {
11 |
12 | fun initMeasurement(context: Context, params: Bundle)
13 | fun startMeasurement(context: Context)
14 | fun pauseMeasurement(context: Context)
15 | suspend fun saveMeasurement(context: Context)
16 | suspend fun onDestroyMeasurement(context: Context)
17 |
18 | companion object {
19 | // keys for the bundle in service to handlers
20 | const val FOLDER_NAME = "FOLDER_NAME"
21 | const val SENSOR_ID = "SENSOR_ID"
22 | const val SENSOR_SPEED = "SENSOR_SPEED"
23 | const val INTERNAL_STORAGE = "INTERNAL_STORAGE"
24 | }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_battery.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
13 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_water_drop.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
14 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_link.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_license.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_vendor.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/activity_main_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_policy.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_policy.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
24 |
--------------------------------------------------------------------------------
/sensorservices/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_acceleration_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_provider.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_gps.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_maxdelay.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_mindelay.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_gravity_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
17 |
22 |
23 |
--------------------------------------------------------------------------------
/wear/src/main/res/layout/button_picksensor_start.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/app_bar_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/fastlane/README.md:
--------------------------------------------------------------------------------
1 | fastlane documentation
2 | ----
3 |
4 | # Installation
5 |
6 | Make sure you have the latest version of the Xcode command line tools installed:
7 |
8 | ```sh
9 | xcode-select --install
10 | ```
11 |
12 | For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
13 |
14 | # Available Actions
15 |
16 | ## Android
17 |
18 | ### android test
19 |
20 | ```sh
21 | [bundle exec] fastlane android test
22 | ```
23 |
24 | Runs all the tests
25 |
26 | ### android increment_vc
27 |
28 | ```sh
29 | [bundle exec] fastlane android increment_vc
30 | ```
31 |
32 | Increment version code
33 |
34 | ### android build
35 |
36 | ```sh
37 | [bundle exec] fastlane android build
38 | ```
39 |
40 | Build
41 |
42 | ### android deploy_internal
43 |
44 | ```sh
45 | [bundle exec] fastlane android deploy_internal
46 | ```
47 |
48 | Phone app to the google play
49 |
50 | ----
51 |
52 | This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
53 |
54 | More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
55 |
56 | The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
57 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_settings_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_incognito.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
21 |
22 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_incognito.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/motionapps/sensorbox/intro/PowerSaverExplanationFragment.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorbox.intro
2 |
3 | import android.annotation.SuppressLint
4 | import android.os.Build
5 | import android.os.Bundle
6 | import android.view.LayoutInflater
7 | import android.view.View
8 | import android.view.ViewGroup
9 | import androidx.annotation.RequiresApi
10 | import androidx.core.content.ContextCompat
11 | import androidx.fragment.app.Fragment
12 | import com.github.appintro.SlideBackgroundColorHolder
13 | import com.motionapps.sensorbox.R
14 |
15 | @RequiresApi(Build.VERSION_CODES.M)
16 | @SuppressLint("BatteryLife")
17 | /**
18 | * Needed custom layout and fragment object for background colour
19 | *
20 | */
21 | class PowerSaverExplanationFragment : Fragment(), SlideBackgroundColorHolder {
22 |
23 | override fun onCreateView(
24 | inflater: LayoutInflater, container: ViewGroup?,
25 | savedInstanceState: Bundle?
26 | ): View? {
27 |
28 | return inflater.inflate(R.layout.fragment_explanation_power_saver, container, false)
29 | }
30 |
31 | override val defaultBackgroundColor: Int
32 | get() = ContextCompat.getColor(requireContext(), R.color.colorRedLT)
33 |
34 | override fun setBackgroundColor(backgroundColor: Int) {}
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_short_time.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_magnet.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/fastlane/report.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/wear/src/main/res/drawable/ic_brightness.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
27 |
30 |
33 |
34 |
--------------------------------------------------------------------------------
/wear/src/main/res/layout/activity_graph_viewer.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
17 |
18 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/motionapps/sensorbox/viewmodels/MainRepository.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorbox.viewmodels
2 |
3 | import com.motionapps.countdowndialog.CountDownMain
4 | import com.motionapps.sensorbox.fragments.advanced.extrahandlers.AlarmHandler
5 | import com.motionapps.sensorbox.fragments.advanced.extrahandlers.NoteHandler
6 | import com.motionapps.sensorbox.uiHandlers.SensorViewHandler
7 | import com.motionapps.wearoslib.WearOsHandler
8 | import kotlinx.coroutines.ExperimentalCoroutinesApi
9 | import kotlinx.coroutines.InternalCoroutinesApi
10 |
11 | @ExperimentalCoroutinesApi
12 | @InternalCoroutinesApi
13 | /**
14 | * Main object, which are used in MainActivity
15 | *
16 | * @property sensorViewHandler - handles sensors to measure
17 | * @property countDownMain - handles counting of the SHORT type - used as part of AdvancedMeasurement
18 | * @property noteHandler - saves notes to JSON - used as part of AdvancedMeasurement
19 | * @property alarmHandler - saves time intervals for alarms - used as part of AdvancedMeasurement
20 | * @property wearOsHandler - manages Wear Os, if available
21 | */
22 | class MainRepository(
23 | val sensorViewHandler: SensorViewHandler,
24 | val countDownMain: CountDownMain,
25 | val noteHandler: NoteHandler,
26 | val alarmHandler: AlarmHandler,
27 | val wearOsHandler: WearOsHandler
28 | )
--------------------------------------------------------------------------------
/wear/src/main/res/layout/activity_maps.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
16 |
17 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/motionapps/sensorbox/di/MeasurementRepositoryModule.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorbox.di
2 |
3 | import com.motionapps.countdowndialog.CountDownMain
4 | import com.motionapps.sensorbox.uiHandlers.GraphUpdater
5 | import com.motionapps.sensorbox.viewmodels.MeasurementRepository
6 | import com.motionapps.wearoslib.WearOsHandler
7 | import dagger.Module
8 | import dagger.Provides
9 | import dagger.hilt.InstallIn
10 | import dagger.hilt.android.components.ActivityRetainedComponent
11 | import dagger.hilt.android.scopes.ActivityRetainedScoped
12 |
13 |
14 | @Module
15 | @InstallIn(ActivityRetainedComponent::class)
16 | object MeasurementRepositoryModule {
17 |
18 | /**
19 | * Repository for MeasurementActivity
20 | * Contains countdown lib, graphUpdater - updates chart with registered sensor, and WearOs handler
21 | *
22 | * @param countDownMain - created in MainRepository - reusable instances
23 | * @param graphUpdater - created in MainRepository - reusable instances
24 | * @param wearOsHandler - created in MainRepository - reusable instances
25 | * @return
26 | */
27 | @ActivityRetainedScoped
28 | @Provides
29 | fun getMeasurementRepository(countDownMain: CountDownMain, graphUpdater: GraphUpdater, wearOsHandler: WearOsHandler): MeasurementRepository {
30 | return MeasurementRepository(countDownMain, graphUpdater, wearOsHandler)
31 |
32 | }
33 | }
--------------------------------------------------------------------------------
/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=-Xmx2048m
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 | kapt.incremental.apt=true
23 | kapt.use.worker.api=false
24 | android.defaults.buildfeatures.buildconfig=true
25 | android.nonTransitiveRClass=false
26 | android.nonFinalResIds=false
27 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_proximity.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
17 |
22 |
27 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_maxvalue.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/motionapps/sensorbox/di/GpsModule.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorbox.di
2 |
3 | import android.content.Context
4 | import com.motionapps.sensorbox.fragments.displayers.GPSDisplayer
5 | import com.motionapps.sensorservices.handlers.GPSHandler
6 | import dagger.Module
7 | import dagger.Provides
8 | import dagger.hilt.InstallIn
9 | import dagger.hilt.android.components.FragmentComponent
10 | import dagger.hilt.android.qualifiers.ApplicationContext
11 | import dagger.hilt.android.scopes.FragmentScoped
12 | import kotlinx.coroutines.ExperimentalCoroutinesApi
13 | import kotlinx.coroutines.InternalCoroutinesApi
14 |
15 | @ExperimentalCoroutinesApi
16 | @Module
17 | @InstallIn(FragmentComponent::class)
18 | object GpsModule {
19 | /**
20 | * Provides basic GPSHandler - can register GPS updates and specify parameters, listeners, ...
21 | * @return
22 | */
23 | @InternalCoroutinesApi
24 | @FragmentScoped
25 | @Provides
26 | fun provideGPSHandler(): GPSHandler{
27 | return GPSHandler()
28 | }
29 |
30 | /**
31 | * Uses GPSHandler to get info about location and shows it in specific tabs
32 | * @param context
33 | * @param gpsHandler - uses GPSHandler to manage access to location
34 | * @return
35 | */
36 | @InternalCoroutinesApi
37 | @FragmentScoped
38 | @Provides
39 | fun providesGPSDisplayer(@ApplicationContext context: Context, gpsHandler: GPSHandler): GPSDisplayer{
40 | return GPSDisplayer(context, gpsHandler)
41 | }
42 |
43 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/motionapps/sensorbox/intro/PowerSaverFragment.kt:
--------------------------------------------------------------------------------
1 | package com.motionapps.sensorbox.intro
2 |
3 | import android.os.Build
4 | import android.os.Bundle
5 | import android.view.LayoutInflater
6 | import android.view.View
7 | import android.view.ViewGroup
8 | import android.widget.Button
9 | import androidx.annotation.RequiresApi
10 | import androidx.core.content.ContextCompat
11 | import androidx.fragment.app.Fragment
12 | import com.github.appintro.SlideBackgroundColorHolder
13 | import com.motionapps.sensorbox.R
14 | import com.motionapps.sensorservices.handlers.PowerManagement
15 |
16 | @RequiresApi(Build.VERSION_CODES.M)
17 | /**
18 | * Asks user to add app to the whitelist
19 | *
20 | */
21 | class PowerSaverFragment : Fragment(), SlideBackgroundColorHolder {
22 |
23 | override fun onCreateView(
24 | inflater: LayoutInflater, container: ViewGroup?,
25 | savedInstanceState: Bundle?
26 | ): View {
27 |
28 | val view: View = inflater.inflate(R.layout.fragment_power_saver, container, false)
29 |
30 | (view.findViewById