├── common
├── .gitignore
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── sk
│ │ │ └── trupici
│ │ │ └── gwatch
│ │ │ └── wear
│ │ │ └── common
│ │ │ ├── data
│ │ │ ├── Packet.java
│ │ │ ├── Trend.java
│ │ │ ├── TLV.java
│ │ │ ├── PacketType.java
│ │ │ ├── PacketBase.java
│ │ │ └── ConfigPacket.java
│ │ │ └── util
│ │ │ └── CommonConstants.java
│ │ └── res
│ │ └── values
│ │ └── strings.xml
└── build.gradle
├── mobile
├── .gitignore
├── debug
│ ├── mobile-debug.apk
│ └── output-metadata.json
├── src
│ └── main
│ │ ├── res
│ │ ├── drawable
│ │ │ ├── ic_gwatch.png
│ │ │ ├── portfolio.png
│ │ │ ├── designer_logo.png
│ │ │ ├── ic_watch_18dp.png
│ │ │ ├── ic_watch_24dp.png
│ │ │ ├── widget_preview.png
│ │ │ ├── ic_baseline_expand_less_24.xml
│ │ │ └── ic_baseline_expand_more_24.xml
│ │ ├── drawable-hdpi
│ │ │ ├── ic_clear.png
│ │ │ ├── ic_info.png
│ │ │ ├── ic_send.png
│ │ │ ├── ic_stop.png
│ │ │ ├── ic_watch.png
│ │ │ ├── ic_delete.png
│ │ │ ├── ic_console_24.png
│ │ │ ├── ic_settings.png
│ │ │ ├── ic_stat_name.png
│ │ │ ├── ic_image_search.png
│ │ │ ├── ic_sync_problem.png
│ │ │ ├── ic_action_gwatch.png
│ │ │ ├── ic_search_folder.png
│ │ │ └── ic_action_gwatch_holo_dark.png
│ │ ├── drawable-mdpi
│ │ │ ├── ic_clear.png
│ │ │ ├── ic_info.png
│ │ │ ├── ic_send.png
│ │ │ ├── ic_stop.png
│ │ │ ├── ic_watch.png
│ │ │ ├── ic_delete.png
│ │ │ ├── ic_console_24.png
│ │ │ ├── ic_settings.png
│ │ │ ├── ic_stat_name.png
│ │ │ ├── ic_image_search.png
│ │ │ ├── ic_sync_problem.png
│ │ │ ├── ic_action_gwatch.png
│ │ │ ├── ic_search_folder.png
│ │ │ └── ic_action_gwatch_holo_dark.png
│ │ ├── drawable-xhdpi
│ │ │ ├── ic_info.png
│ │ │ ├── ic_send.png
│ │ │ ├── ic_stop.png
│ │ │ ├── ic_clear.png
│ │ │ ├── ic_delete.png
│ │ │ ├── ic_watch.png
│ │ │ ├── ic_settings.png
│ │ │ ├── ic_stat_name.png
│ │ │ ├── ic_console_24.png
│ │ │ ├── ic_action_gwatch.png
│ │ │ ├── ic_image_search.png
│ │ │ ├── ic_search_folder.png
│ │ │ ├── ic_sync_problem.png
│ │ │ └── ic_action_gwatch_holo_dark.png
│ │ ├── mipmap-hdpi
│ │ │ ├── ic_gwatch.png
│ │ │ ├── ic_gwatch_round.png
│ │ │ ├── ic_gwatch_background.png
│ │ │ └── ic_gwatch_foreground.png
│ │ ├── mipmap-mdpi
│ │ │ ├── ic_gwatch.png
│ │ │ ├── ic_gwatch_round.png
│ │ │ ├── ic_gwatch_background.png
│ │ │ └── ic_gwatch_foreground.png
│ │ ├── mipmap-xhdpi
│ │ │ ├── ic_gwatch.png
│ │ │ ├── ic_gwatch_round.png
│ │ │ ├── ic_gwatch_background.png
│ │ │ └── ic_gwatch_foreground.png
│ │ ├── drawable-xxhdpi
│ │ │ ├── ic_clear.png
│ │ │ ├── ic_info.png
│ │ │ ├── ic_send.png
│ │ │ ├── ic_stop.png
│ │ │ ├── ic_watch.png
│ │ │ ├── ic_delete.png
│ │ │ ├── ic_settings.png
│ │ │ ├── ic_console_24.png
│ │ │ ├── ic_stat_name.png
│ │ │ ├── ic_action_gwatch.png
│ │ │ ├── ic_image_search.png
│ │ │ ├── ic_search_folder.png
│ │ │ ├── ic_sync_problem.png
│ │ │ └── ic_action_gwatch_holo_dark.png
│ │ ├── drawable-xxxhdpi
│ │ │ ├── ic_info.png
│ │ │ ├── ic_send.png
│ │ │ ├── ic_stop.png
│ │ │ ├── ic_clear.png
│ │ │ ├── ic_delete.png
│ │ │ ├── ic_watch.png
│ │ │ ├── ic_settings.png
│ │ │ ├── ic_stat_name.png
│ │ │ ├── ic_console_24.png
│ │ │ ├── ic_image_search.png
│ │ │ ├── ic_sync_problem.png
│ │ │ ├── ic_action_gwatch.png
│ │ │ ├── ic_search_folder.png
│ │ │ └── ic_action_gwatch_holo_dark.png
│ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_gwatch.png
│ │ │ ├── ic_gwatch_round.png
│ │ │ ├── ic_gwatch_background.png
│ │ │ └── ic_gwatch_foreground.png
│ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_gwatch.png
│ │ │ ├── ic_gwatch_round.png
│ │ │ ├── ic_gwatch_background.png
│ │ │ └── ic_gwatch_foreground.png
│ │ ├── xml
│ │ │ ├── locales_config.xml
│ │ │ ├── wear.xml
│ │ │ ├── widget_info.xml
│ │ │ └── pref_main.xml
│ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_gwatch.xml
│ │ │ └── ic_gwatch_round.xml
│ │ ├── layout
│ │ │ ├── analog_settings_activity.xml
│ │ │ ├── layout_tab_test.xml
│ │ │ ├── pref_time_picker_dialog.xml
│ │ │ ├── activity_settings.xml
│ │ │ └── packet_console_layout.xml
│ │ ├── anim
│ │ │ ├── no_anim.xml
│ │ │ ├── slide_in_left.xml
│ │ │ ├── slide_in_right.xml
│ │ │ ├── slide_out_left.xml
│ │ │ └── slide_out_right.xml
│ │ ├── values
│ │ │ ├── arrays.xml
│ │ │ └── styles.xml
│ │ └── menu
│ │ │ ├── menu_packet_view.xml
│ │ │ ├── menu_main.xml
│ │ │ └── menu_settings.xml
│ │ └── java
│ │ └── sk
│ │ └── trupici
│ │ └── gwatch
│ │ └── wear
│ │ ├── util
│ │ ├── CommonConstants.java
│ │ ├── AndroidUtils.java
│ │ └── IoUtils.java
│ │ ├── console
│ │ ├── PacketConsoleView.java
│ │ └── PacketConsole.java
│ │ ├── settings
│ │ ├── ConfigType.java
│ │ ├── fragment
│ │ │ ├── GlucoseLevelsFragment.java
│ │ │ ├── AppWidgetTextFragment.java
│ │ │ ├── MainFragment.java
│ │ │ ├── AppWidgetFragment.java
│ │ │ ├── AppWidgetTrendIndicatorFragment.java
│ │ │ └── AppWidgetGraphFragment.java
│ │ ├── ValuePreference.java
│ │ ├── ConfigData.java
│ │ └── PreferenceMap.java
│ │ ├── dispatch
│ │ └── Dispatcher.java
│ │ ├── followers
│ │ ├── CommunicationException.java
│ │ └── TooManyRequestsException.java
│ │ ├── widget
│ │ └── WidgetProvider.java
│ │ ├── data
│ │ ├── SyncPacket.java
│ │ └── Queue.java
│ │ ├── receivers
│ │ ├── ExplicitBgBroadcastReceiver.java
│ │ └── BootReceiver.java
│ │ └── view
│ │ └── HorizontalSwipeDetector.java
└── proguard-rules.pro
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── wearable
├── libs
│ └── holocolorpicker-2.0.aar
├── src
│ └── main
│ │ ├── res
│ │ ├── raw
│ │ │ ├── alarm_high.ogg
│ │ │ ├── alarm_low.ogg
│ │ │ ├── alarm_nodata.ogg
│ │ │ ├── alarm_critical.ogg
│ │ │ └── alarm_fastdrop.ogg
│ │ ├── drawable
│ │ │ ├── drop_48.png
│ │ │ ├── frame_50.png
│ │ │ ├── alarm_dismiss_48.png
│ │ │ ├── alarm_snooze_48.png
│ │ │ ├── config_more_items.png
│ │ │ ├── config_border_rect_24.png
│ │ │ ├── config_color_edit_24.png
│ │ │ ├── config_no_border_24.png
│ │ │ ├── config_add_complication.png
│ │ │ ├── config_border_circle_24.png
│ │ │ ├── config_border_rect_dash_24.png
│ │ │ ├── config_border_rect_dot_24.png
│ │ │ ├── config_border_circle_dash_24.png
│ │ │ ├── config_border_circle_dot_24.png
│ │ │ ├── config_border_round_rect_24.png
│ │ │ ├── config_border_round_rect_dot_24.png
│ │ │ ├── config_border_round_rect_dash_24.png
│ │ │ └── alarm_button.xml
│ │ ├── drawable-nodpi
│ │ │ ├── empty.png
│ │ │ ├── circle_10.png
│ │ │ ├── circle_8.png
│ │ │ ├── seconds_1.png
│ │ │ ├── hands_1_preview.png
│ │ │ ├── hours_classic.png
│ │ │ ├── hours_default.png
│ │ │ ├── minutes_classic.png
│ │ │ ├── minutes_default.png
│ │ │ ├── preview_analog.png
│ │ │ ├── preview_digital.png
│ │ │ ├── seconds_classic.png
│ │ │ ├── seconds_default.png
│ │ │ ├── hours_classic_shadow.png
│ │ │ ├── hours_shadow_default.png
│ │ │ ├── hands_classic_preview.png
│ │ │ ├── hands_default_preview.png
│ │ │ ├── minutes_classic_shadow.png
│ │ │ ├── minutes_shadow_default.png
│ │ │ ├── seconds_classic_shadow.png
│ │ │ ├── seconds_shadow_default.png
│ │ │ ├── digital_pure_background_1.png
│ │ │ ├── analog_active_background_1.png
│ │ │ ├── analog_active_background_2.png
│ │ │ ├── analog_classic_background_1.png
│ │ │ ├── analog_classic_background_2.png
│ │ │ ├── digital_background_default.png
│ │ │ └── analog_active_background_default.png
│ │ ├── mipmap-hdpi
│ │ │ └── ic_gwatch.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_gwatch.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_gwatch.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_gwatch.png
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_gwatch.png
│ │ ├── xml
│ │ │ ├── analog_watchface.xml
│ │ │ ├── digital_watchface.xml
│ │ │ └── wear.xml
│ │ ├── layout
│ │ │ ├── config_list_border_item.xml
│ │ │ ├── config_list_button_item.xml
│ │ │ ├── config_list_empty_item.xml
│ │ │ ├── config_list_switch_item.xml
│ │ │ ├── layout_border_picker.xml
│ │ │ ├── layout_config_main.xml
│ │ │ ├── layout_config_page2.xml
│ │ │ ├── layout_config_page.xml
│ │ │ ├── config_list_complication_item.xml
│ │ │ └── layout_config_item_page.xml
│ │ └── values
│ │ │ ├── complications.xml
│ │ │ ├── digital_time_panel.xml
│ │ │ ├── date_panel.xml
│ │ │ ├── bg_panel.xml
│ │ │ ├── layout_dimens.xml
│ │ │ ├── bg_graph.xml
│ │ │ ├── color.xml
│ │ │ ├── styles.xml
│ │ │ └── color_picker.xml
│ │ └── java
│ │ └── sk
│ │ └── trupici
│ │ └── gwatch
│ │ └── wear
│ │ ├── config
│ │ ├── BackgroundChangeAware.java
│ │ ├── item
│ │ │ ├── PaddingConfigItem.java
│ │ │ ├── BoolConfigItem.java
│ │ │ ├── BorderConfigItem.java
│ │ │ ├── ConfigItem.java
│ │ │ └── BasicConfigItem.java
│ │ ├── ProviderInfoRetrieverActivity.java
│ │ ├── complications
│ │ │ ├── ComplicationConfigItem.java
│ │ │ ├── ComplicationId.java
│ │ │ ├── ComplicationsConfigViewHolder.java
│ │ │ └── AnalogComplicationViewHolder.java
│ │ ├── ActivityResultAware.java
│ │ ├── ConfigItemData.java
│ │ ├── BorderType.java
│ │ ├── ConfigPageData.java
│ │ ├── ConfigItemListPageViewHolder.java
│ │ ├── SwitchViewHolder.java
│ │ ├── PickerViewHolder.java
│ │ ├── HandsConfigData.java
│ │ └── menu
│ │ │ ├── ComplicationsMenuItems.java
│ │ │ └── BorderTypeMenuItems.java
│ │ ├── data
│ │ ├── ConfigType.java
│ │ └── ConfigData.java
│ │ ├── components
│ │ ├── ComponentPanel.java
│ │ └── BgGraphView.java
│ │ └── util
│ │ ├── CommonConstants.java
│ │ └── UiUtils.java
├── proguard-rules.pro
├── .gitignore
└── build.gradle
├── settings.gradle
├── gradle.properties
├── .gitignore
└── README.md
/common/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/mobile/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/mobile/debug/mobile-debug.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/debug/mobile-debug.apk
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/wearable/libs/holocolorpicker-2.0.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/libs/holocolorpicker-2.0.aar
--------------------------------------------------------------------------------
/wearable/src/main/res/raw/alarm_high.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/raw/alarm_high.ogg
--------------------------------------------------------------------------------
/wearable/src/main/res/raw/alarm_low.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/raw/alarm_low.ogg
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable/ic_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable/ic_gwatch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable/portfolio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable/portfolio.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/drop_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/drop_48.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/frame_50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/frame_50.png
--------------------------------------------------------------------------------
/wearable/src/main/res/raw/alarm_nodata.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/raw/alarm_nodata.ogg
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_clear.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_info.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_send.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_stop.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_watch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_clear.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_info.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_send.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_stop.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_watch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_info.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_send.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_stop.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable/designer_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable/designer_logo.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable/ic_watch_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable/ic_watch_18dp.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable/ic_watch_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable/ic_watch_24dp.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-hdpi/ic_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-hdpi/ic_gwatch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-mdpi/ic_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-mdpi/ic_gwatch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-xhdpi/ic_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-xhdpi/ic_gwatch.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/empty.png
--------------------------------------------------------------------------------
/wearable/src/main/res/raw/alarm_critical.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/raw/alarm_critical.ogg
--------------------------------------------------------------------------------
/wearable/src/main/res/raw/alarm_fastdrop.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/raw/alarm_fastdrop.ogg
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_delete.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_delete.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_clear.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_delete.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_watch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_clear.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_info.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_send.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_stop.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_watch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_info.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_send.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_stop.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable/widget_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable/widget_preview.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-xxhdpi/ic_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-xxhdpi/ic_gwatch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-xxxhdpi/ic_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-xxxhdpi/ic_gwatch.png
--------------------------------------------------------------------------------
/wearable/src/main/res/mipmap-hdpi/ic_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/mipmap-hdpi/ic_gwatch.png
--------------------------------------------------------------------------------
/wearable/src/main/res/mipmap-mdpi/ic_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/mipmap-mdpi/ic_gwatch.png
--------------------------------------------------------------------------------
/wearable/src/main/res/mipmap-xhdpi/ic_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/mipmap-xhdpi/ic_gwatch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_console_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_console_24.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_settings.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_console_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_console_24.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_settings.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_settings.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_delete.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_settings.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_clear.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_delete.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_watch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-hdpi/ic_gwatch_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-hdpi/ic_gwatch_round.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-mdpi/ic_gwatch_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-mdpi/ic_gwatch_round.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/circle_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/circle_10.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/circle_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/circle_8.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/seconds_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/seconds_1.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/alarm_dismiss_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/alarm_dismiss_48.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/alarm_snooze_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/alarm_snooze_48.png
--------------------------------------------------------------------------------
/wearable/src/main/res/mipmap-xxhdpi/ic_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/mipmap-xxhdpi/ic_gwatch.png
--------------------------------------------------------------------------------
/wearable/src/main/res/mipmap-xxxhdpi/ic_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/mipmap-xxxhdpi/ic_gwatch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_image_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_image_search.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_sync_problem.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_sync_problem.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_image_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_image_search.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_sync_problem.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_sync_problem.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_console_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_console_24.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_console_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_console_24.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_settings.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-xhdpi/ic_gwatch_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-xhdpi/ic_gwatch_round.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-xxhdpi/ic_gwatch_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-xxhdpi/ic_gwatch_round.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/config_more_items.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/config_more_items.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_action_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_action_gwatch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_search_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_search_folder.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_action_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_action_gwatch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_search_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_search_folder.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_action_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_action_gwatch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_image_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_image_search.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_search_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_search_folder.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_sync_problem.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_sync_problem.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_action_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_action_gwatch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_image_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_image_search.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_search_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_search_folder.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_sync_problem.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_sync_problem.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_console_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_console_24.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_image_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_image_search.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_sync_problem.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_sync_problem.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-hdpi/ic_gwatch_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-hdpi/ic_gwatch_background.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-hdpi/ic_gwatch_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-hdpi/ic_gwatch_foreground.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-mdpi/ic_gwatch_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-mdpi/ic_gwatch_background.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-mdpi/ic_gwatch_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-mdpi/ic_gwatch_foreground.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-xxxhdpi/ic_gwatch_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-xxxhdpi/ic_gwatch_round.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/hands_1_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/hands_1_preview.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/hours_classic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/hours_classic.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/hours_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/hours_default.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/minutes_classic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/minutes_classic.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/minutes_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/minutes_default.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/preview_analog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/preview_analog.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/preview_digital.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/preview_digital.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/seconds_classic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/seconds_classic.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/seconds_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/seconds_default.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/config_border_rect_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/config_border_rect_24.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/config_color_edit_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/config_color_edit_24.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/config_no_border_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/config_no_border_24.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_action_gwatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_action_gwatch.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_search_folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_search_folder.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-xhdpi/ic_gwatch_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-xhdpi/ic_gwatch_background.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-xhdpi/ic_gwatch_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-xhdpi/ic_gwatch_foreground.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-xxhdpi/ic_gwatch_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-xxhdpi/ic_gwatch_background.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-xxhdpi/ic_gwatch_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-xxhdpi/ic_gwatch_foreground.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/config_add_complication.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/config_add_complication.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/config_border_circle_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/config_border_circle_24.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-xxxhdpi/ic_gwatch_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-xxxhdpi/ic_gwatch_background.png
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-xxxhdpi/ic_gwatch_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/mipmap-xxxhdpi/ic_gwatch_foreground.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/hours_classic_shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/hours_classic_shadow.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/hours_shadow_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/hours_shadow_default.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/config_border_rect_dash_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/config_border_rect_dash_24.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/config_border_rect_dot_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/config_border_rect_dot_24.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/hands_classic_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/hands_classic_preview.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/hands_default_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/hands_default_preview.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/minutes_classic_shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/minutes_classic_shadow.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/minutes_shadow_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/minutes_shadow_default.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/seconds_classic_shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/seconds_classic_shadow.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/seconds_shadow_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/seconds_shadow_default.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/config_border_circle_dash_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/config_border_circle_dash_24.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/config_border_circle_dot_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/config_border_circle_dot_24.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/config_border_round_rect_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/config_border_round_rect_24.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-hdpi/ic_action_gwatch_holo_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-hdpi/ic_action_gwatch_holo_dark.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-mdpi/ic_action_gwatch_holo_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-mdpi/ic_action_gwatch_holo_dark.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xhdpi/ic_action_gwatch_holo_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xhdpi/ic_action_gwatch_holo_dark.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxhdpi/ic_action_gwatch_holo_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_action_gwatch_holo_dark.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/digital_pure_background_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/digital_pure_background_1.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/config_border_round_rect_dot_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/config_border_round_rect_dot_24.png
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable-xxxhdpi/ic_action_gwatch_holo_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/mobile/src/main/res/drawable-xxxhdpi/ic_action_gwatch_holo_dark.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/analog_active_background_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/analog_active_background_1.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/analog_active_background_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/analog_active_background_2.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/analog_classic_background_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/analog_classic_background_1.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/analog_classic_background_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/analog_classic_background_2.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/digital_background_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/digital_background_default.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/config_border_round_rect_dash_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable/config_border_round_rect_dash_24.png
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable-nodpi/analog_active_background_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trupici/G-Watch-Wear/HEAD/wearable/src/main/res/drawable-nodpi/analog_active_background_default.png
--------------------------------------------------------------------------------
/common/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/wearable/src/main/res/drawable/alarm_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/mobile/src/main/res/xml/locales_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Sep 11 19:32:29 CEST 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-anydpi-v26/ic_gwatch.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/mobile/src/main/res/mipmap-anydpi-v26/ic_gwatch_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable/ic_baseline_expand_less_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/mobile/src/main/res/drawable/ic_baseline_expand_more_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | dependencyResolutionManagement {
2 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
3 | repositories {
4 | google()
5 | mavenCentral()
6 | maven { url 'https://jitpack.io' }
7 | maven { url "https://maven.localazy.com/repository/release/" }
8 | }
9 | }
10 | rootProject.name = "G-Watch Wear App"
11 | include ':mobile'
12 | include ':wearable'
13 | include ':common'
14 |
--------------------------------------------------------------------------------
/mobile/debug/output-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "artifactType": {
4 | "type": "APK",
5 | "kind": "Directory"
6 | },
7 | "applicationId": "sk.trupici.gwatch.wear",
8 | "variantName": "debug",
9 | "elements": [
10 | {
11 | "type": "SINGLE",
12 | "filters": [],
13 | "attributes": [],
14 | "versionCode": 1,
15 | "versionName": "1.0",
16 | "outputFile": "mobile-debug.apk"
17 | }
18 | ],
19 | "elementType": "File"
20 | }
--------------------------------------------------------------------------------
/mobile/src/main/res/layout/analog_settings_activity.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
11 |
12 |
17 |
18 |
--------------------------------------------------------------------------------
/wearable/src/main/res/xml/analog_watchface.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/wearable/src/main/res/xml/digital_watchface.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/mobile/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
--------------------------------------------------------------------------------
/wearable/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
--------------------------------------------------------------------------------
/mobile/src/main/res/xml/wear.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | - verify_remote_gwatch_phone_app
20 |
21 |
--------------------------------------------------------------------------------
/mobile/src/main/res/layout/layout_tab_test.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
19 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/util/CommonConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.util;
18 |
19 | public interface CommonConstants {
20 | String PREF_IS_UNIT_CONVERSION = "cfg_glucose_units_conversion";
21 | String PREF_NO_DATA_THRESHOLD = "bg_threshold_no_data";
22 | }
23 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/BackgroundChangeAware.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config;
18 |
19 | /**
20 | * Interface for {@code ViewHolder}s supporting background layer
21 | */
22 | public interface BackgroundChangeAware {
23 | void onBackgroundChanged();
24 | }
25 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/data/ConfigType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package sk.trupici.gwatch.wear.data;
19 |
20 | public enum ConfigType {
21 | BYTE,
22 | WORD,
23 | DWORD,
24 | COLOR,
25 | BOOLEAN,
26 | STRING,
27 | FLOAT
28 | }
29 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/console/PacketConsoleView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.console;
20 |
21 | public interface PacketConsoleView {
22 | void setText(String text);
23 | void setConnectionStatus(Boolean isConnected);
24 | }
25 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/settings/ConfigType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package sk.trupici.gwatch.wear.settings;
19 |
20 | public enum ConfigType {
21 | BYTE,
22 | WORD,
23 | DWORD,
24 | COLOR,
25 | BOOLEAN,
26 | STRING,
27 | FLOAT
28 | }
29 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/item/PaddingConfigItem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config.item;
18 |
19 | public class PaddingConfigItem implements ConfigItem {
20 |
21 | @Override
22 | public Type getConfigType() {
23 | return Type.TYPE_PADDING;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/wearable/src/main/res/xml/wear.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
19 |
20 | - verify_remote_gwatch_wear_app
21 |
22 |
--------------------------------------------------------------------------------
/mobile/src/main/res/anim/no_anim.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/mobile/src/main/res/anim/slide_in_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/mobile/src/main/res/anim/slide_in_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/mobile/src/main/res/anim/slide_out_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/wearable/src/main/res/layout/config_list_border_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/wearable/src/main/res/layout/config_list_button_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/ProviderInfoRetrieverActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config;
18 |
19 | import android.support.wearable.complications.ProviderInfoRetriever;
20 |
21 | public interface ProviderInfoRetrieverActivity {
22 | ProviderInfoRetriever getProviderInfoRetriever();
23 | }
24 |
--------------------------------------------------------------------------------
/mobile/src/main/res/anim/slide_out_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/util/AndroidUtils.java:
--------------------------------------------------------------------------------
1 | package sk.trupici.gwatch.wear.util;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.app.PendingIntent;
5 | import android.os.Build;
6 | import android.os.Bundle;
7 |
8 | import androidx.annotation.RequiresApi;
9 |
10 | public class AndroidUtils {
11 |
12 | public static int getMutableFlag(boolean mutable) {
13 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
14 | return 0;
15 | } else {
16 | return getMutableFlagValue(mutable);
17 | }
18 | }
19 |
20 | @RequiresApi(api = Build.VERSION_CODES.S)
21 | @SuppressLint("WrongConstant")
22 | private static int getMutableFlagValue(boolean mutable) {
23 | return mutable ? PendingIntent.FLAG_MUTABLE : PendingIntent.FLAG_IMMUTABLE;
24 | }
25 |
26 | @SuppressWarnings("deprecation")
27 | public static Object getBundleObject(Bundle bundle, String key) {
28 | return bundle.get(key);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/wearable/src/main/res/values/complications.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | #00000000
19 | NONE
20 |
21 | #00000000
22 | #FFFCFCFC
23 |
24 |
--------------------------------------------------------------------------------
/mobile/src/main/res/layout/pref_time_picker_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
--------------------------------------------------------------------------------
/wearable/src/main/res/layout/config_list_empty_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/common/src/main/java/sk/trupici/gwatch/wear/common/data/Packet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.common.data;
20 |
21 | import android.content.Context;
22 |
23 | public interface Packet {
24 | int PACKET_HEADER_SIZE = 2;
25 |
26 | PacketType getType();
27 |
28 | byte[] getData();
29 |
30 | String toText(Context context, String header);
31 | }
32 |
--------------------------------------------------------------------------------
/wearable/src/main/res/values/digital_time_panel.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | true
20 |
21 | #00000000
22 | #FFFCFCFC
23 |
24 | #00000000
25 | NONE
26 |
27 |
--------------------------------------------------------------------------------
/wearable/src/main/res/layout/config_list_switch_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
26 |
--------------------------------------------------------------------------------
/wearable/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | .idea/
3 | gradle/
4 |
5 | # User-specific stuff:
6 | .idea/workspace.xml
7 | .idea/tasks.xml
8 | .idea/dictionaries
9 | .idea/vcs.xml
10 | .idea/jsLibraryMappings.xml
11 |
12 | # Sensitive or high-churn files:
13 | .idea/dataSources.ids
14 | .idea/dataSources.xml
15 | .idea/dataSources.local.xml
16 | .idea/sqlDataSources.xml
17 | .idea/dynamic.xml
18 | .idea/uiDesigner.xml
19 |
20 | # Gradle:
21 | .idea/gradle.xml
22 | .idea/libraries
23 |
24 | # Mongo Explorer plugin:
25 | .idea/mongoSettings.xml
26 |
27 | ## File-based project format:
28 | *.iws
29 |
30 | ## Plugin-specific files:
31 |
32 | # IntelliJ
33 | /out/
34 |
35 | # mpeltonen/sbt-idea plugin
36 | .idea_modules/
37 |
38 | # JIRA plugin
39 | atlassian-ide-plugin.xml
40 |
41 | # Crashlytics plugin (for Android Studio and IntelliJ)
42 | com_crashlytics_export_strings.xml
43 | crashlytics.properties
44 | crashlytics-build.properties
45 | fabric.properties
46 |
47 | ### Intellij Patch ###
48 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
49 |
50 | # *.iml
51 | # modules.xml
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/dispatch/Dispatcher.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.dispatch;
20 |
21 | import android.content.Context;
22 |
23 | import sk.trupici.gwatch.wear.common.data.Packet;
24 |
25 | public interface Dispatcher {
26 | /** dispatch packet to the watch */
27 | boolean dispatch(Packet packet);
28 |
29 | /** reconnect to the watch */
30 | void reconnect(Context context);
31 | }
32 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/complications/ComplicationConfigItem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config.complications;
18 |
19 | import sk.trupici.gwatch.wear.config.item.ConfigItem;
20 |
21 | /**
22 | * Data for Complications Preview item in RecyclerView.
23 | */
24 | public class ComplicationConfigItem implements ConfigItem {
25 | @Override
26 | public Type getConfigType() {
27 | return Type.TYPE_COMPLICATION;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/common/src/main/java/sk/trupici/gwatch/wear/common/util/CommonConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.common.util;
18 |
19 | public interface CommonConstants {
20 |
21 | long SECOND_IN_MILLIS = 1000L;
22 | int MINUTE_IN_SECONDS = 60;
23 | long MINUTE_IN_MILLIS = 60000L; // 60 * 1000
24 | int HOUR_IN_MINUTES = 60;
25 | long HOUR_IN_MILLIS = 3600000L; // 60 * 60 * 1000
26 | int DAY_IN_MINUTES = 1440; // 24 * 60
27 | long DAY_IN_MILLIS = 86400000L; // 24 * 60 * 60 * 1000
28 | }
29 |
--------------------------------------------------------------------------------
/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 -Dfile.encoding=UTF-8
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
--------------------------------------------------------------------------------
/mobile/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 | - System
22 | - English
23 | - Русский
24 | - Slovenčina
25 |
26 |
27 |
28 | - system
29 | - en
30 | - ru
31 | - sk
32 |
33 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/console/PacketConsole.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.console;
20 |
21 | public interface PacketConsole {
22 |
23 | void showText(String text);
24 |
25 | void init();
26 | String getText();
27 |
28 | void onWatchConnectionChanged(boolean isConnected);
29 | Boolean getIsWatchConnected();
30 |
31 | void registerView(PacketConsoleView view);
32 | void unregisterView(PacketConsoleView view);
33 | }
34 |
--------------------------------------------------------------------------------
/mobile/src/main/res/xml/widget_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
27 |
28 |
--------------------------------------------------------------------------------
/common/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.library'
3 | }
4 |
5 | def buildProperties = new Properties()
6 | buildProperties.load(new FileInputStream(rootProject.file("local.properties")))
7 |
8 | android {
9 | compileSdk 30
10 |
11 | defaultConfig {
12 | minSdk 25
13 | targetSdk 30
14 | }
15 |
16 | buildTypes {
17 | release {
18 | minifyEnabled false
19 | }
20 | }
21 | compileOptions {
22 | sourceCompatibility JavaVersion.VERSION_1_8
23 | targetCompatibility JavaVersion.VERSION_1_8
24 | }
25 | }
26 |
27 | dependencies {
28 | implementation 'androidx.preference:preference:1.2.0'
29 | }
30 |
31 |
32 | apply plugin: 'com.localazy.gradle'
33 |
34 | localazy {
35 | readKey "a8358596450190348286-6c93f41a75d8ced983708bf35c1da00c0bb4bda7c986e350f15809df8c3fd25b"
36 | writeKey "${localazy.writeKey}"
37 |
38 | copyFrom project(":mobile")
39 |
40 | injection {
41 | installRepositories false
42 | }
43 |
44 | upload {
45 | ignoreMissingDefault true
46 | deprecateMissing false
47 | defaultLang "en"
48 | showUploadAll true
49 | }
50 | }
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/followers/CommunicationException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.followers;
20 |
21 | public class CommunicationException extends RuntimeException{
22 | public CommunicationException() {
23 | }
24 |
25 | public CommunicationException(String message) {
26 | super(message);
27 | }
28 |
29 | public CommunicationException(String message, Throwable cause) {
30 | super(message, cause);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/common/src/main/java/sk/trupici/gwatch/wear/common/data/Trend.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package sk.trupici.gwatch.wear.common.data;
19 |
20 | import java.util.Arrays;
21 |
22 | public enum Trend {
23 | UNKNOWN,
24 | UP_FAST,
25 | UP,
26 | UP_SLOW,
27 | FLAT,
28 | DOWN_SLOW,
29 | DOWN,
30 | DOWN_FAST;
31 |
32 | public static Trend valueOf(int ordinal) {
33 | return Arrays.stream(values()).filter(x -> x.ordinal() == ordinal).findFirst().orElse(UNKNOWN);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/wearable/src/main/res/values/date_panel.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | #00000000
19 | #FFFC0709
20 | #FFFC0709
21 | #FFFCFCFC
22 |
23 | #00000000
24 | NONE
25 |
26 | false
27 |
28 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/ActivityResultAware.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config;
18 |
19 | import android.content.Intent;
20 |
21 | /**
22 | * Interface for {@code Adapter}s handling the result of activities invoked to enter/change {@code ConfigItem} value
23 | */
24 | public interface ActivityResultAware {
25 | /**
26 | * @return true if the activity result was processed successfully and the view should be scrolled to the very first position
27 | */
28 | boolean onActivityResult(int requestCode, int resultCode, Intent data);
29 | }
30 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/settings/fragment/GlucoseLevelsFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.settings.fragment;
20 |
21 | import android.os.Bundle;
22 |
23 | import sk.trupici.gwatch.wear.R;
24 |
25 | public class GlucoseLevelsFragment extends SettingsFragment {
26 | @Override
27 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
28 | setPreferencesFromResource(R.xml.pref_glucose_levels, rootKey);
29 | super.onCreatePreferences(savedInstanceState, rootKey);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/settings/fragment/AppWidgetTextFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.settings.fragment;
20 |
21 | import android.os.Bundle;
22 |
23 | import sk.trupici.gwatch.wear.R;
24 |
25 | public class AppWidgetTextFragment extends SettingsFragment {
26 | @Override
27 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
28 | setPreferencesFromResource(R.xml.pref_app_widget_text, rootKey);
29 | super.onCreatePreferences(savedInstanceState, rootKey);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/settings/fragment/MainFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.settings.fragment;
20 |
21 | import android.os.Bundle;
22 |
23 | import sk.trupici.gwatch.wear.R;
24 |
25 | public class MainFragment extends sk.trupici.gwatch.wear.settings.fragment.SettingsFragment {
26 | @Override
27 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
28 | setPreferencesFromResource(R.xml.pref_main, rootKey);
29 | super.onCreatePreferences(savedInstanceState, rootKey);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/settings/fragment/AppWidgetFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.settings.fragment;
20 |
21 | import android.os.Bundle;
22 |
23 | import sk.trupici.gwatch.wear.R;
24 |
25 | public class AppWidgetFragment extends sk.trupici.gwatch.wear.settings.fragment.SettingsFragment {
26 | @Override
27 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
28 | setPreferencesFromResource(R.xml.pref_app_widget, rootKey);
29 | super.onCreatePreferences(savedInstanceState, rootKey);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/ConfigItemData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config;
18 |
19 | public class ConfigItemData {
20 | int id;
21 | String label;
22 | int resourceId;
23 |
24 | public ConfigItemData(int id, String label, int resourceId) {
25 | this.id = id;
26 | this.label = label;
27 | this.resourceId = resourceId;
28 | }
29 |
30 | public int getId() {
31 | return id;
32 | }
33 |
34 | public String getLabel() {
35 | return label;
36 | }
37 |
38 | public int getResourceId() {
39 | return resourceId;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/wearable/src/main/res/layout/layout_border_picker.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
23 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/item/BoolConfigItem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config.item;
18 |
19 | public class BoolConfigItem extends BasicConfigItem {
20 | public BoolConfigItem(int labelResourceId, String preferenceName, Type type, int defaultValueResourceId) {
21 | this(labelResourceId, preferenceName, type, defaultValueResourceId, false);
22 | }
23 |
24 | public BoolConfigItem(int labelResourceId, String preferenceName, Type type, int defaultValueResourceId, boolean isGlobal) {
25 | super(labelResourceId, -1, preferenceName, type, defaultValueResourceId, isGlobal);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/wearable/src/main/res/values/bg_panel.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | 270
20 | 170
21 | 80
22 | 70
23 | 360
24 |
25 | 5
26 | false
27 |
28 | #00000000
29 | NONE
30 |
31 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/settings/fragment/AppWidgetTrendIndicatorFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.settings.fragment;
20 |
21 | import android.os.Bundle;
22 |
23 | import sk.trupici.gwatch.wear.R;
24 |
25 | public class AppWidgetTrendIndicatorFragment extends sk.trupici.gwatch.wear.settings.fragment.SettingsFragment {
26 | @Override
27 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
28 | setPreferencesFromResource(R.xml.pref_app_widget_trend_indicator, rootKey);
29 | super.onCreatePreferences(savedInstanceState, rootKey);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/complications/ComplicationId.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config.complications;
18 |
19 | import java.util.Arrays;
20 |
21 | /**
22 | * Enumeration of unique IDs for each complication.
23 | */
24 | public enum ComplicationId {
25 | LEFT,
26 | RIGHT,
27 | TOP_LEFT,
28 | TOP_RIGHT,
29 | BOTTOM_LEFT,
30 | BOTTOM_RIGHT,
31 | TOP,
32 | CENTER,
33 | BOTTOM,
34 | ;
35 |
36 | public static ComplicationId valueOf(int ordinal) {
37 | return Arrays.stream(values()).filter(x -> x.ordinal() == ordinal).findFirst().orElseThrow(IllegalArgumentException::new);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/components/ComponentPanel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.components;
18 |
19 | import android.content.Context;
20 | import android.content.SharedPreferences;
21 | import android.graphics.Canvas;
22 | import android.os.Bundle;
23 |
24 | public interface ComponentPanel {
25 |
26 | void onCreate(Context context, SharedPreferences sharedPrefs);
27 |
28 | void onSizeChanged(Context context, int width, int height);
29 |
30 | void onConfigChanged(Context context, SharedPreferences sharedPrefs);
31 |
32 | void onPropertiesChanged(Context context, Bundle properties);
33 |
34 | void onDraw(Canvas canvas, boolean isAmbientMode);
35 | }
36 |
--------------------------------------------------------------------------------
/common/src/main/java/sk/trupici/gwatch/wear/common/data/TLV.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.common.data;
20 |
21 | public class TLV {
22 | private byte tag;
23 | private byte len;
24 | private byte[] value;
25 |
26 | public TLV(byte tag, byte len, byte[] value) {
27 | this.tag = tag;
28 | this.len = len;
29 | this.value = value;
30 | }
31 |
32 | public int getTotalLen() {
33 | return 2 + len;
34 | }
35 |
36 | public byte getTag() {
37 | return tag;
38 | }
39 |
40 | public byte getLen() {
41 | return len;
42 | }
43 |
44 | public byte[] getValue() {
45 | return value;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/BorderType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config;
18 |
19 | public enum BorderType {
20 | NONE,
21 | RECT,
22 | ROUNDED_RECT,
23 | RING,
24 | DASHED_RECT,
25 | DASHED_ROUNDED_RECT,
26 | DASHED_RING,
27 | DOTTED_RECT,
28 | DOTTED_ROUNDED_RECT,
29 | DOTTED_RING
30 | ;
31 |
32 | public static BorderType getByNameOrDefault(String name) {
33 | if (name != null) {
34 | try {
35 | return BorderType.valueOf(name);
36 | } catch (IllegalArgumentException e) {
37 | // swallow
38 | }
39 | }
40 |
41 | // default border
42 | return BorderType.NONE;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/common/src/main/java/sk/trupici/gwatch/wear/common/data/PacketType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.common.data;
20 |
21 | import java.util.Arrays;
22 |
23 | /**
24 | * Packet type enumeration.
25 | * Types ordinals must be equal in watch processor.
26 | */
27 | public enum PacketType {
28 | SYNC(0),
29 | CONFIG(1),
30 | GLUCOSE(2),
31 | AAPS(3),
32 | ;
33 |
34 | private final int code;
35 |
36 | PacketType(int code) {
37 | this.code = code;
38 | }
39 |
40 | public byte getCodeAsByte() {
41 | return (byte) code;
42 | }
43 |
44 | public static PacketType getByCode(int code) {
45 | return Arrays.stream(values()).filter(x -> x.code == code).findFirst().orElseGet(null);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/wearable/src/main/res/values/layout_dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | 12dp
19 |
20 | 6dp
21 | 2dp
22 | 2dp
23 | 20dp
24 | 20dp
25 | 30dp
26 |
27 | 26dp
28 | 2dp
29 | 4dp
30 |
31 | 450px
32 | 450px
33 |
34 |
--------------------------------------------------------------------------------
/common/src/main/java/sk/trupici/gwatch/wear/common/data/PacketBase.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.common.data;
20 |
21 | public abstract class PacketBase implements Packet {
22 | private static final String LOCAL_SOURCE = "G-Watch Service";
23 |
24 | private final PacketType type;
25 | private final String source;
26 |
27 | public PacketBase(PacketType type, String source) {
28 | this.type = type;
29 | this.source = source == null ? LOCAL_SOURCE : source;
30 | }
31 |
32 | ///////////////////////////////////////////////////////////////////////////
33 | // Packet implementation
34 |
35 | @Override
36 | public PacketType getType() {
37 | return type;
38 | }
39 |
40 | public String getSource() {
41 | return source;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/item/BorderConfigItem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config.item;
18 |
19 | import sk.trupici.gwatch.wear.config.BorderType;
20 |
21 | public class BorderConfigItem {
22 |
23 | final private BorderType id;
24 | final private int labelResourceId;
25 | final private int iconResourceId;
26 |
27 | public BorderConfigItem(BorderType id, int labelResourceId, int iconResourceId) {
28 | this.id = id;
29 | this.labelResourceId = labelResourceId;
30 | this.iconResourceId = iconResourceId;
31 | }
32 |
33 | public BorderType getId() {
34 | return id;
35 | }
36 |
37 | public int getLabelResourceId() {
38 | return labelResourceId;
39 | }
40 |
41 | public int getIconResourceId() {
42 | return iconResourceId;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/util/CommonConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.util;
18 |
19 | public interface CommonConstants {
20 | String BG_RECEIVER_ACTION = "sk.trupici.gwatch.wear.BG_RECEIVER_ACTION";
21 | String REMOTE_CONFIG_ACTION = "sk.trupici.gwatch.wear.REMOTE_CONFIG_ACTION";
22 |
23 | String PREF_IS_UNIT_CONVERSION = "bg_is_unit_conversion";
24 |
25 | String PREF_HYPER_THRESHOLD = "bg_threshold_hyper";
26 | String PREF_HIGH_THRESHOLD = "bg_threshold_high";
27 | String PREF_LOW_THRESHOLD = "bg_threshold_low";
28 | String PREF_HYPO_THRESHOLD = "bg_threshold_hypo";
29 | String PREF_NO_DATA_THRESHOLD = "bg_threshold_no_data";
30 |
31 | int COMPLICATION_CONFIG_REQUEST_CODE = 101;
32 | int UPDATE_COLORS_CONFIG_REQUEST_CODE = 102;
33 | int BORDER_TYPE_CONFIG_REQUEST_CODE = 103;
34 | }
35 |
--------------------------------------------------------------------------------
/wearable/src/main/res/values/bg_graph.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | #FF888888
20 | #FFFC0709
21 | #FFFFBB09
22 | #FFBC0007
23 |
24 | true
25 | true
26 | true
27 | true
28 |
29 | true
30 |
31 | true
32 | false
33 |
34 | 5
35 |
36 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/settings/ValuePreference.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.settings;
20 |
21 | import android.content.Context;
22 |
23 | import androidx.preference.Preference;
24 |
25 | public class ValuePreference extends Preference {
26 | private Integer value;
27 |
28 | public ValuePreference(Context context, String key, int value) {
29 | super(context);
30 | setKey(key);
31 | this.value = value;
32 | }
33 |
34 | public int getValue() {
35 | return value;
36 | }
37 |
38 | @Override
39 | public int hashCode() {
40 | final int prime = 31;
41 | return prime + getKey().hashCode();
42 | }
43 |
44 | @Override
45 | public boolean equals(Object obj) {
46 | return obj != null && getClass() == obj.getClass() && hashCode() == obj.hashCode();
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/followers/TooManyRequestsException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.followers;
20 |
21 | import androidx.annotation.Nullable;
22 |
23 | /**
24 | * Communication exception representing HTTP 429 status code
25 | */
26 | public class TooManyRequestsException extends CommunicationException {
27 | private final String retryAfter;
28 |
29 | public TooManyRequestsException(String retryAfter) {
30 | this.retryAfter = retryAfter;
31 | }
32 | public TooManyRequestsException(String retryAfter, String message) {
33 | super(message);
34 | this.retryAfter = retryAfter;
35 | }
36 |
37 | public TooManyRequestsException(String retryAfter, String message, Throwable cause) {
38 | super(message, cause);
39 | this.retryAfter = retryAfter;
40 | }
41 |
42 | @Nullable
43 | public String getRetryAfter() {
44 | return retryAfter;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/wearable/src/main/res/values/color.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | #00000000
19 | #FF0000
20 |
21 | #000000
22 | #424242
23 |
24 |
25 | #DDDDDD
26 | #FF00FF
27 | #2259FF
28 |
29 | #00000000
30 | #FFBC0007
31 | #FFFC0709
32 | #FF28EE09
33 | #FFFFBB09
34 | #FFFF6909
35 | #FF008BE4
36 | #FFFC0709
37 |
38 |
39 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/widget/WidgetProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.widget;
20 |
21 | import android.appwidget.AppWidgetManager;
22 | import android.appwidget.AppWidgetProvider;
23 | import android.content.Context;
24 | import android.util.Log;
25 |
26 | import java.util.Collections;
27 |
28 | import sk.trupici.gwatch.wear.BuildConfig;
29 | import sk.trupici.gwatch.wear.GWatchApplication;
30 | import sk.trupici.gwatch.wear.common.data.ConfigPacket;
31 |
32 | public class WidgetProvider extends AppWidgetProvider {
33 | @Override
34 | public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
35 | if (BuildConfig.DEBUG) {
36 | Log.i(GWatchApplication.LOG_TAG, "WidgetProvider:onUpdate");
37 | }
38 | // let WidgetUpdateService do all the work...
39 | WidgetUpdateService.updateWidget(new ConfigPacket(Collections.emptyList(), 0));
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/item/ConfigItem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config.item;
18 |
19 | import java.util.Arrays;
20 |
21 | import androidx.recyclerview.widget.RecyclerView;
22 |
23 | /**
24 | * Interface all ConfigItems must implement so the {@link RecyclerView}'s Adapter associated
25 | * with the configuration activity knows what type of ViewHolder to inflate.
26 | */
27 | public interface ConfigItem {
28 |
29 | enum Type {
30 | TYPE_COMPLICATION,
31 | TYPE_COLOR,
32 | TYPE_SWITCH,
33 | TYPE_PADDING,
34 | TYPE_BORDER_TYPE,
35 | // complications specific
36 | TYPE_BORDER_COLOR,
37 | TYPE_DATA_COLOR,
38 | TYPE_BKG_COLOR,
39 | ;
40 |
41 | public static Type valueOf(int ordinal) {
42 | return Arrays.stream(values()).filter(x -> x.ordinal() == ordinal).findFirst().orElseThrow(IllegalArgumentException::new);
43 | }
44 | }
45 |
46 | Type getConfigType();
47 | }
48 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/ConfigPageData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config;
18 |
19 | import java.util.Arrays;
20 |
21 | public class ConfigPageData {
22 |
23 | public enum ConfigType {
24 | BACKGROUND,
25 | HANDS,
26 | COMPLICATIONS,
27 | BG_PANEL,
28 | BG_GRAPH,
29 | DATE_PANEL,
30 | ALARMS,
31 | TIME_PANEL
32 | ;
33 |
34 | public static ConfigType valueOf(int ordinal) {
35 | return Arrays.stream(values()).filter(x -> x.ordinal() == ordinal).findFirst().orElseThrow(IllegalArgumentException::new);
36 | }
37 | }
38 |
39 | final private ConfigType type;
40 | final private int titleId;
41 |
42 | public ConfigPageData(ConfigType type, int titleId) {
43 | this.type = type;
44 | this.titleId = titleId;
45 | }
46 |
47 | public ConfigType getType() {
48 | return type;
49 | }
50 |
51 | public int getTitleId() {
52 | return titleId;
53 | }
54 |
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/common/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Type: %1$s
20 | Source: %1$s
21 | Received at: %1$s
22 | Timestamp: %1$s
23 | Glucose: %1$d mg/dl (%2$.1f mmol/l)
24 | Trend: %1$s
25 | Battery: %1$d%%
26 | Length: %1$d B
27 | Name: %1$s
28 | Items: %1$d
29 |
30 | COB: %1$sg
31 | IOB: %1$sU
32 | TBR: %1$s
33 | Profile: %1$s
34 | Pump: %1$s
35 |
36 | Invalid value
37 |
38 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /build/
3 |
4 | # Ignore Gradle GUI config
5 | gradle-app.setting
6 |
7 |
8 | # Cache of project
9 | .gradletasknamecache
10 |
11 | # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
12 | # gradle/wrapper/gradle-wrapper.properties
13 |
14 | *.iml
15 | .idea/
16 | /.idea/
17 |
18 | /local.properties
19 | /.idea/caches
20 | /.idea/libraries
21 | /.idea/modules.xml
22 | /.idea/workspace.xml
23 | /.idea/navEditor.xml
24 | /.idea/assetWizardSettings.xml
25 | .DS_Store
26 | /build
27 | /captures
28 | .externalNativeBuild
29 | .cxx
30 | local.properties
31 |
32 | # User-specific stuff:
33 | .idea/workspace.xml
34 | .idea/tasks.xml
35 | .idea/dictionaries
36 | .idea/vcs.xml
37 | .idea/jsLibraryMappings.xml
38 |
39 | # Sensitive or high-churn files:
40 | .idea/dataSources.ids
41 | .idea/dataSources.xml
42 | .idea/dataSources.local.xml
43 | .idea/sqlDataSources.xml
44 | .idea/dynamic.xml
45 | .idea/uiDesigner.xml
46 |
47 | # Gradle:
48 | .idea/gradle.xml
49 | .idea/libraries
50 |
51 | # Mongo Explorer plugin:
52 | .idea/mongoSettings.xml
53 |
54 | ## File-based project format:
55 | *.iws
56 |
57 | ## Plugin-specific files:
58 |
59 | # IntelliJ
60 | /out/
61 |
62 | # mpeltonen/sbt-idea plugin
63 | .idea_modules/
64 |
65 | # JIRA plugin
66 | atlassian-ide-plugin.xml
67 |
68 | # Crashlytics plugin (for Android Studio and IntelliJ)
69 | com_crashlytics_export_strings.xml
70 | crashlytics.properties
71 | crashlytics-build.properties
72 | fabric.properties
73 |
74 | ### Intellij Patch ###
75 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
76 |
77 | # *.iml
78 | # modules.xml
79 | wearable/.localazy
80 | mobile/.localazy
81 | mobile/release/mobile-release.aab
82 | mobile/release/**
83 | wearable/release/
84 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/data/SyncPacket.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.data;
20 |
21 | import android.content.Context;
22 |
23 | import sk.trupici.gwatch.wear.R;
24 | import sk.trupici.gwatch.wear.common.data.PacketBase;
25 | import sk.trupici.gwatch.wear.common.data.PacketType;
26 |
27 | public class SyncPacket extends PacketBase {
28 | private static final int PKT_LEN = 2;
29 |
30 | public SyncPacket() {
31 | super(PacketType.SYNC, null);
32 | }
33 |
34 | @Override
35 | public byte[] getData() {
36 | byte[] data = new byte[PKT_LEN];
37 | data[0] = getType().getCodeAsByte();
38 | data[1] = 0;
39 | return data;
40 | }
41 |
42 | @Override
43 | public String toText(Context context, String header) {
44 |
45 | StringBuffer text = new StringBuffer();
46 | if (header != null) {
47 | text.append(header).append("\n");
48 | }
49 | text.append(context.getString(R.string.packet_type, getType().name()));
50 | return text.toString();
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/data/ConfigData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package sk.trupici.gwatch.wear.data;
19 |
20 | public class ConfigData {
21 |
22 | public static final byte TAG_GL_THRESHOLD_HYPO = 0x01;
23 | public static final byte TAG_GL_THRESHOLD_LOW = 0x02;
24 | public static final byte TAG_GL_THRESHOLD_HIGH = 0x03;
25 | public static final byte TAG_GL_THRESHOLD_HYPER = 0x04;
26 | public static final byte TAG_GL_UNIT_CONVERSION = 0x05;
27 |
28 |
29 | final private byte tag;
30 | final private ConfigType type;
31 | final private String prefName;
32 |
33 | public ConfigData(byte tag, ConfigType type) {
34 | this(tag, type, null);
35 | }
36 |
37 | public ConfigData(byte tag, ConfigType type, String prefName) {
38 | this.tag = tag;
39 | this.type = type;
40 | this.prefName = prefName;
41 | }
42 |
43 | public byte getTag() {
44 | return tag;
45 | }
46 |
47 | public ConfigType getType() {
48 | return type;
49 | }
50 |
51 | public String getPrefName() {
52 | return prefName;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/settings/ConfigData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package sk.trupici.gwatch.wear.settings;
19 |
20 | public class ConfigData {
21 |
22 | public static final byte TAG_GL_THRESHOLD_HYPO = 0x01;
23 | public static final byte TAG_GL_THRESHOLD_LOW = 0x02;
24 | public static final byte TAG_GL_THRESHOLD_HIGH = 0x03;
25 | public static final byte TAG_GL_THRESHOLD_HYPER = 0x04;
26 | public static final byte TAG_GL_UNIT_CONVERSION = 0x05;
27 |
28 |
29 | final private byte tag;
30 | final private ConfigType type;
31 | final private String prefName;
32 |
33 | public ConfigData(byte tag, ConfigType type) {
34 | this(tag, type, null);
35 | }
36 |
37 | public ConfigData(byte tag, ConfigType type, String prefName) {
38 | this.tag = tag;
39 | this.type = type;
40 | this.prefName = prefName;
41 | }
42 |
43 | public byte getTag() {
44 | return tag;
45 | }
46 |
47 | public ConfigType getType() {
48 | return type;
49 | }
50 |
51 | public String getPrefName() {
52 | return prefName;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/mobile/src/main/res/menu/menu_packet_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
--------------------------------------------------------------------------------
/common/src/main/java/sk/trupici/gwatch/wear/common/data/ConfigPacket.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.common.data;
20 |
21 | import java.util.List;
22 |
23 | import sk.trupici.gwatch.wear.common.util.PacketUtils;
24 |
25 | public class ConfigPacket extends TLVPacket {
26 | public ConfigPacket(List tlvList, int totalLen) {
27 | super(tlvList, totalLen, PacketType.CONFIG);
28 | }
29 |
30 | @Override
31 | protected String getPacketName() {
32 | return "CONFIG";
33 | }
34 |
35 | public static ConfigPacket of(byte[] data) {
36 | if (data.length < PACKET_HEADER_SIZE) {
37 | return null;
38 | }
39 |
40 | byte type = data[0];
41 |
42 | if (type != PacketType.CONFIG.getCodeAsByte()) {
43 | return null;
44 | }
45 |
46 | short shortLen = PacketUtils.decodeShort(data, 1);
47 | int totalLen = (shortLen & 0xFFFF);
48 |
49 | try {
50 | List tlvList = decodeTLVs(data, 3);
51 | return new ConfigPacket(tlvList, totalLen);
52 | } catch (IndexOutOfBoundsException e) {
53 | return null;
54 | }
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/data/Queue.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.data;
20 |
21 | import java.util.ArrayList;
22 | import java.util.List;
23 |
24 | public class Queue {
25 | final private List buffer;
26 | final private int limit;
27 |
28 | public Queue(int limit) {
29 | this.limit = limit;
30 | buffer = new ArrayList<>(limit);
31 | }
32 |
33 | public synchronized T peek() {
34 | if (buffer.isEmpty()) {
35 | return null;
36 | }
37 | return buffer.get(0);
38 | }
39 |
40 | public synchronized T poll() {
41 | if (buffer.isEmpty()) {
42 | return null;
43 | }
44 | return buffer.remove(0);
45 | }
46 |
47 | public synchronized void push(T data) {
48 | if (data != null) {
49 | if (buffer.size() >= limit) {
50 | buffer.remove(0);
51 | }
52 | buffer.add(data);
53 | }
54 | }
55 |
56 | public synchronized int size() {
57 | return buffer.size();
58 | }
59 |
60 | public synchronized boolean isEmpty() {
61 | return buffer.isEmpty();
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/mobile/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
--------------------------------------------------------------------------------
/wearable/src/main/res/layout/layout_config_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
26 |
27 |
34 |
35 |
44 |
45 |
--------------------------------------------------------------------------------
/wearable/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
27 |
28 |
39 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/util/UiUtils.java:
--------------------------------------------------------------------------------
1 | package sk.trupici.gwatch.wear.util;
2 |
3 | import android.graphics.Color;
4 | import android.graphics.ColorMatrix;
5 | import android.graphics.ColorMatrixColorFilter;
6 | import android.graphics.Paint;
7 | import android.graphics.PorterDuff;
8 | import android.graphics.PorterDuffXfermode;
9 | import android.graphics.Rect;
10 | import android.text.TextPaint;
11 | import android.view.View;
12 |
13 | public class UiUtils {
14 |
15 | public static Paint createPaint() {
16 | return setPaint(new Paint());
17 | }
18 |
19 | public static TextPaint createTextPaint() {
20 | return setPaint(new TextPaint());
21 | }
22 |
23 | private static T setPaint(T paint) {
24 | paint.setAntiAlias(true);
25 | return paint;
26 | }
27 |
28 | public static Paint createAmbientPaint() {
29 | return setAmbientPaint(new Paint());
30 | }
31 |
32 | public static TextPaint createAmbientTextPaint() {
33 | return setAmbientPaint(new TextPaint());
34 | }
35 |
36 | private static T setAmbientPaint(T paint) {
37 | ColorMatrix colorMatrix = new ColorMatrix();
38 | colorMatrix.setSaturation(0);
39 | ColorMatrixColorFilter filter = new ColorMatrixColorFilter(colorMatrix);
40 | paint.setColorFilter(filter);
41 | return paint;
42 | }
43 |
44 | public static Paint createErasePaint() {
45 | Paint paint = new Paint();
46 | paint.setStyle(Paint.Style.FILL);
47 | paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
48 | paint.setColor(Color.TRANSPARENT);
49 | return paint;
50 | }
51 |
52 | public static Rect getViewBounds(View view) {
53 | int[] pos = new int[2];
54 | view.getLocationOnScreen(pos);
55 | return new Rect(pos[0], pos[1], view.getWidth(), view.getHeight());
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/wearable/src/main/res/layout/layout_config_page2.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
25 |
26 |
33 |
34 |
35 |
36 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/ConfigItemListPageViewHolder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config;
18 |
19 | import android.view.View;
20 | import android.widget.TextView;
21 |
22 | import androidx.annotation.NonNull;
23 | import androidx.wear.widget.WearableRecyclerView;
24 | import sk.trupici.gwatch.wear.R;
25 |
26 | /**
27 | * {@code ViewHolder} holding a config page with {@code ConfigItem} list
28 | */
29 | public class ConfigItemListPageViewHolder extends WearableRecyclerView.ViewHolder {
30 | final private TextView title;
31 | final private WearableRecyclerView recyclerView;
32 | final private int viewId;
33 |
34 | public ConfigItemListPageViewHolder(@NonNull View itemView) {
35 | super(itemView);
36 | viewId = itemView.getId();
37 | title = itemView.findViewById(R.id.page_title);
38 | recyclerView = itemView.findViewById(R.id.wearable_recycler_view);
39 | // Aligns the first and last items on the list vertically centered on the screen.
40 | recyclerView.setEdgeItemsCenteringEnabled(true);
41 | }
42 |
43 | public TextView getTitle() {
44 | return title;
45 | }
46 |
47 | public WearableRecyclerView getRecyclerView() {
48 | return recyclerView;
49 | }
50 |
51 | public int getViewId() {
52 | return viewId;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/wearable/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | }
4 |
5 | def buildProperties = new Properties()
6 | buildProperties.load(new FileInputStream(rootProject.file("local.properties")))
7 |
8 | android {
9 | signingConfigs {
10 | release {
11 | keyAlias buildProperties['signKeyAlias']
12 | keyPassword buildProperties['signKeyPassword']
13 | storeFile file(buildProperties['signStorePath'])
14 | storePassword buildProperties['signStorePassword']
15 | }
16 | }
17 | compileSdk 31
18 |
19 | defaultConfig {
20 | applicationId "sk.trupici.gwatch.wear"
21 | minSdk 30
22 | targetSdk 30
23 | versionCode 2000010 // use 2xxxxxx codes for watch app
24 | versionName "0.9.7"
25 |
26 | multiDexEnabled true
27 | }
28 |
29 |
30 | buildTypes {
31 | release {
32 | signingConfig signingConfigs.release
33 | }
34 | }
35 | }
36 |
37 | dependencies {
38 | implementation 'com.google.android.gms:play-services-wearable:17.1.0'
39 | implementation 'com.google.android.gms:play-services-base:18.0.1'
40 |
41 | implementation "androidx.wear:wear:1.2.0"
42 | implementation "androidx.wear:wear-input:1.1.0"
43 |
44 | implementation 'com.google.android.support:wearable:2.8.1'
45 | compileOnly 'com.google.android.wearable:wearable:2.8.1'
46 |
47 | implementation 'androidx.viewpager2:viewpager2:1.0.0'
48 |
49 | implementation 'androidx.work:work-runtime:2.7.1'
50 |
51 | implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
52 |
53 | implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
54 |
55 | implementation project(path: ':common')
56 |
57 | implementation files('libs/holocolorpicker-2.0.aar')
58 | }
59 |
60 |
61 | apply plugin: 'com.localazy.gradle'
62 |
63 | localazy {
64 | copyFrom project(":mobile")
65 | upload {
66 | ignoreMissingDefault true
67 | deprecateMissing false
68 | defaultLang "en"
69 | showUploadAll true
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/receivers/ExplicitBgBroadcastReceiver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.receivers;
20 |
21 | import android.content.BroadcastReceiver;
22 | import android.content.Context;
23 | import android.content.Intent;
24 | import android.util.Log;
25 |
26 | import sk.trupici.gwatch.wear.GWatchApplication;
27 |
28 | /**
29 | * BG broadcast receiver registered in manifest listening
30 | * to explicit BG broadcasts with specified G-Watch package name.
31 | *
32 | * Explicit broadcast is delivered to app even if app is not running or it is in sleep mode.
33 | * In this case the app is started or woken up to process the broadcast.
34 | */
35 | public class ExplicitBgBroadcastReceiver extends BroadcastReceiver {
36 |
37 | @Override
38 | public void onReceive(Context context, Intent intent) {
39 | // UiUtils.showMessage(context, context.getString(R.string.glucose_packet_received, "", UiUtils.formatTime(new Date())));
40 |
41 | // now the app is awake and all implicit BG receivers are registered,
42 | // so we can use them to process new BG data
43 | Log.i(GWatchApplication.LOG_TAG, "Received static intent: " + intent.getAction());
44 | if (intent.getPackage() != null) {
45 | ((GWatchApplication) context.getApplicationContext()).processIntent(context, intent);
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/components/BgGraphView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.components;
18 |
19 | import android.content.Context;
20 | import android.graphics.Canvas;
21 | import android.graphics.RectF;
22 | import android.util.AttributeSet;
23 | import android.view.View;
24 |
25 | import androidx.annotation.Nullable;
26 | import sk.trupici.gwatch.wear.components.BgGraph;
27 |
28 | public class BgGraphView extends View {
29 |
30 | private BgGraph bgGraph;
31 | private final RectF bounds;
32 |
33 | public BgGraphView(Context context, @Nullable AttributeSet attrs) {
34 | super(context, attrs);
35 | this.bounds = new RectF();
36 | }
37 |
38 | @Override
39 | protected void onDraw(Canvas canvas) {
40 | super.onDraw(canvas);
41 |
42 | if (bgGraph != null) {
43 | bgGraph.draw(canvas, false);
44 | }
45 | }
46 |
47 | @Override
48 | protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
49 | super.onLayout(changed, left, top, right, bottom);
50 |
51 | if (right > 0 && bottom > 0) {
52 | bounds.left = 0;
53 | bounds.top = 0;
54 | bounds.right = getWidth();
55 | bounds.bottom = getHeight();
56 | bgGraph.resize(bounds);
57 | }
58 | }
59 |
60 | public void setBgGraph(BgGraph bgGraph) {
61 | this.bgGraph = bgGraph;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/SwitchViewHolder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config;
18 |
19 | import android.annotation.SuppressLint;
20 | import android.content.Context;
21 | import android.view.View;
22 | import android.widget.Switch;
23 |
24 | import androidx.recyclerview.widget.RecyclerView;
25 | import sk.trupici.gwatch.wear.R;
26 | import sk.trupici.gwatch.wear.common.util.PreferenceUtils;
27 |
28 | /**
29 | * Simple 2-state switch view holder for bound {@code ConfigItem}
30 | */
31 | public class SwitchViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
32 |
33 | @SuppressLint("UseSwitchCompatOrMaterialCode")
34 | final private Switch button;
35 | private String prefName;
36 |
37 | public SwitchViewHolder(View view) {
38 | super(view);
39 | button = view.findViewById(R.id.switch_button);
40 | view.setOnClickListener(this);
41 | }
42 |
43 | public void init(int labelId, String prefName, boolean defaultValue) {
44 | this.prefName = prefName;
45 |
46 | Context context = button.getContext();
47 | button.setText(context.getString(labelId));
48 |
49 | boolean isOn = PreferenceUtils.isConfigured(button.getContext(), prefName, defaultValue);
50 | button.setChecked(isOn);
51 | }
52 |
53 | @Override
54 | public void onClick(View view) {
55 | PreferenceUtils.setIsConfigured(view.getContext(), prefName, button.isChecked());
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/PickerViewHolder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config;
18 |
19 | import android.content.Context;
20 | import android.view.View;
21 | import android.widget.Button;
22 |
23 | import java.util.function.Consumer;
24 |
25 | import androidx.recyclerview.widget.RecyclerView;
26 | import sk.trupici.gwatch.wear.R;
27 |
28 | /**
29 | * View holding a button to invoke a picker activity for bound {@code ConfigItem}.
30 | */
31 | public class PickerViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
32 |
33 | private Button button;
34 |
35 | private final Consumer onClickCallback;
36 |
37 | public PickerViewHolder(View view, Consumer onClickCallback) {
38 | super(view);
39 |
40 | this.onClickCallback = onClickCallback;
41 |
42 | button = view.findViewById(R.id.button);
43 | view.setOnClickListener(this);
44 | }
45 |
46 | public void setName(int resourceId) {
47 | Context context = button.getContext();
48 | button.setText(context.getString(resourceId));
49 | }
50 |
51 | public void setIcon(int resourceId) {
52 | Context context = button.getContext();
53 | button.setCompoundDrawablesWithIntrinsicBounds(null, null, context.getDrawable(resourceId), null);
54 | }
55 |
56 | @Override
57 | public void onClick(View view) {
58 | if (onClickCallback != null) {
59 | onClickCallback.accept(view);
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/wearable/src/main/res/layout/layout_config_page.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
24 |
25 |
26 |
31 |
32 |
39 |
40 |
41 |
42 |
53 |
--------------------------------------------------------------------------------
/mobile/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
30 |
40 |
41 |
44 |
45 |
53 |
54 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/mobile/src/main/res/layout/activity_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
31 |
32 |
44 |
45 |
50 |
51 |
52 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/wearable/src/main/res/layout/config_list_complication_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
22 |
28 |
29 |
36 |
37 |
43 |
44 |
55 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/HandsConfigData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config;
18 |
19 | public class HandsConfigData extends ConfigItemData {
20 | final private int hourHandId;
21 | final private int hourHandShadowId;
22 | final private int minuteHandId;
23 | final private int minuteHandShadowId;
24 | final private int secondHandId;
25 | final private int secondHandShadowId;
26 |
27 | public HandsConfigData(int id, String label, int resourceId,
28 | int hourHandId, int hourHandShadowId,
29 | int minuteHandId, int minuteHandShadowId,
30 | int secondHandId, int secondHandShadowId) {
31 | super(id, label, resourceId);
32 | this.hourHandId = hourHandId;
33 | this.hourHandShadowId = hourHandShadowId;
34 | this.minuteHandId = minuteHandId;
35 | this.minuteHandShadowId = minuteHandShadowId;
36 | this.secondHandId = secondHandId;
37 | this.secondHandShadowId = secondHandShadowId;
38 | }
39 |
40 | public int getHourHandId() {
41 | return hourHandId;
42 | }
43 |
44 | public int getHourHandShadowId() {
45 | return hourHandShadowId;
46 | }
47 |
48 | public int getMinuteHandId() {
49 | return minuteHandId;
50 | }
51 |
52 | public int getMinuteHandShadowId() {
53 | return minuteHandShadowId;
54 | }
55 |
56 | public int getSecondHandId() {
57 | return secondHandId;
58 | }
59 |
60 | public int getSecondHandShadowId() {
61 | return secondHandShadowId;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/mobile/src/main/res/xml/pref_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
24 |
25 |
33 |
34 |
41 |
42 |
49 |
50 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/mobile/src/main/res/layout/packet_console_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
27 |
28 |
39 |
40 |
46 |
56 |
57 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/complications/ComplicationsConfigViewHolder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config.complications;
18 |
19 | import android.view.View;
20 | import android.widget.TextView;
21 |
22 | import androidx.annotation.NonNull;
23 | import androidx.recyclerview.widget.RecyclerView;
24 | import androidx.wear.widget.WearableRecyclerView;
25 | import sk.trupici.gwatch.wear.R;
26 | import sk.trupici.gwatch.wear.config.BackgroundChangeAware;
27 |
28 | public class ComplicationsConfigViewHolder extends WearableRecyclerView.ViewHolder implements BackgroundChangeAware {
29 | final private TextView title;
30 | final private WearableRecyclerView recyclerView;
31 |
32 | public ComplicationsConfigViewHolder(@NonNull View itemView) {
33 | super(itemView);
34 | title = itemView.findViewById(R.id.page_title);
35 | recyclerView = itemView.findViewById(R.id.wearable_recycler_view);
36 | }
37 |
38 | @Override
39 | public void onBackgroundChanged() {
40 | RecyclerView.Adapter> adapter = recyclerView.getAdapter();
41 | for (int i = 0; i < adapter.getItemCount(); i++) {
42 | View view = recyclerView.getChildAt(i);
43 | if (view != null) {
44 | RecyclerView.ViewHolder holder = recyclerView.getChildViewHolder(view);
45 | if (holder instanceof BackgroundChangeAware) {
46 | ((BackgroundChangeAware)holder).onBackgroundChanged();
47 | }
48 | }
49 | }
50 | }
51 |
52 | public TextView getTitle() {
53 | return title;
54 | }
55 |
56 | public WearableRecyclerView getRecyclerView() {
57 | return recyclerView;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/mobile/src/main/res/menu/menu_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/item/BasicConfigItem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config.item;
18 |
19 | /**
20 | * Data for color picker item in RecyclerView.
21 | */
22 | public class BasicConfigItem implements ConfigItem {
23 |
24 | final private int labelResourceId;
25 | final private int iconResourceId;
26 | final private String preferenceName;
27 | final private Type type;
28 | final private int defaultValueResourceId;
29 | final private boolean isGlobal;
30 |
31 | public BasicConfigItem(int labelResourceId, int iconResourceId, String preferenceName, Type type, int defaultValueResourceId) {
32 | this(labelResourceId, iconResourceId, preferenceName, type, defaultValueResourceId, false);
33 | }
34 |
35 | public BasicConfigItem(int labelResourceId, int iconResourceId, String preferenceName, Type type, int defaultValueResourceId, boolean isGlobal) {
36 | this.labelResourceId = labelResourceId;
37 | this.iconResourceId = iconResourceId;
38 | this.preferenceName = preferenceName;
39 | this.type = type;
40 | this.defaultValueResourceId = defaultValueResourceId;
41 | this.isGlobal = isGlobal;
42 | }
43 |
44 | public int getLabelResourceId() {
45 | return labelResourceId;
46 | }
47 |
48 | public int getIconResourceId() {
49 | return iconResourceId;
50 | }
51 |
52 | public String getPreferenceName() {
53 | return preferenceName;
54 | }
55 |
56 | @Override
57 | public Type getConfigType() {
58 | return type;
59 | }
60 |
61 | public int getDefaultValueResourceId() {
62 | return defaultValueResourceId;
63 | }
64 |
65 | public boolean isGlobal() {
66 | return isGlobal;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/receivers/BootReceiver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.receivers;
20 |
21 | import android.content.BroadcastReceiver;
22 | import android.content.Context;
23 | import android.content.Intent;
24 | import android.util.Log;
25 |
26 | import sk.trupici.gwatch.wear.GWatchApplication;
27 | import sk.trupici.gwatch.wear.common.util.PreferenceUtils;
28 | import sk.trupici.gwatch.wear.followers.DexcomShareFollowerService;
29 | import sk.trupici.gwatch.wear.followers.FollowerService;
30 | import sk.trupici.gwatch.wear.followers.LibreLinkUpFollowerService;
31 | import sk.trupici.gwatch.wear.followers.NightScoutFollowerService;
32 |
33 | public class BootReceiver extends BroadcastReceiver {
34 | @Override
35 | public void onReceive(Context context, Intent arg1) {
36 | Log.w(GWatchApplication.LOG_TAG, "Broadcast receiver notified...");
37 | // App should be already created and thus SAP service instantiated...
38 |
39 | // start Follower service if configured
40 | if (PreferenceUtils.isConfigured(context, NightScoutFollowerService.PREF_NS_ENABLED, false)) {
41 | FollowerService.startService(context, NightScoutFollowerService.class);
42 | } else if (PreferenceUtils.isConfigured(context, DexcomShareFollowerService.PREF_DEXCOM_ENABLED, false)) {
43 | FollowerService.startService(context, DexcomShareFollowerService.class);
44 | } else if (PreferenceUtils.isConfigured(context, LibreLinkUpFollowerService.PREF_LLU_ENABLED, false)) {
45 | FollowerService.startService(context, LibreLinkUpFollowerService.class);
46 | } else {
47 | AlarmReceiver.scheduleNextAlarm(context, AlarmReceiver.WAKE_UP_PERIOD);
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/wearable/src/main/res/values/color_picker.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
23 |
24 |
25 | 140dp
26 | 10dp
27 |
28 |
29 | 40dp
30 | 42dp
31 |
32 |
33 | 10dp
34 | 13dp
35 |
36 |
37 | #000000
38 | #ffffff
39 | true
40 |
41 |
45 | 240dp
46 | 10dp
47 |
48 |
49 | 5dp
50 | 7dp
51 |
52 |
53 | 1dp
54 |
55 |
56 | #000000
57 | #ffffff
58 | true
59 |
60 |
61 | 15
62 |
63 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/view/HorizontalSwipeDetector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.view;
20 |
21 | import android.util.Log;
22 | import android.view.GestureDetector;
23 | import android.view.MotionEvent;
24 |
25 | public class HorizontalSwipeDetector extends GestureDetector.SimpleOnGestureListener {
26 | private static final int SWIPE_MIN_DISTANCE = 50;
27 | private static final int SWIPE_MAX_OFF_PATH = 250;
28 | private static final int SWIPE_THRESHOLD_VELOCITY = 200;
29 |
30 | final private SwipeListener listener;
31 |
32 | public HorizontalSwipeDetector(SwipeListener listener) {
33 | this.listener = listener;
34 | }
35 |
36 | @Override
37 | public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
38 | try {
39 | float diffY = e1.getY() - e2.getY();
40 | float diffX = e1.getX() - e2.getX();
41 |
42 | if (Math.abs(diffY) > SWIPE_MAX_OFF_PATH || Math.abs(velocityX) < SWIPE_THRESHOLD_VELOCITY) {
43 | return false;
44 | }
45 |
46 | if (diffX > SWIPE_MIN_DISTANCE) { // Left swipe
47 | return listener.onLeftSwipe();
48 | } else if (-diffX > SWIPE_MIN_DISTANCE) { // Right swipe
49 | return listener.onRightSwipe();
50 | }
51 | } catch (Exception e) {
52 | Log.e("HorizontalSwipeDetector", "Error on gestures");
53 | }
54 | return false;
55 | }
56 |
57 |
58 | /**
59 | * Interface with horizontal swipe listener callbacks.
60 | *
61 | * Methods should return true if the event is consumed, otherwise false
62 | */
63 | public interface SwipeListener {
64 | boolean onLeftSwipe();
65 | boolean onRightSwipe();
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/complications/AnalogComplicationViewHolder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config.complications;
18 |
19 | import android.view.View;
20 |
21 | import sk.trupici.gwatch.wear.R;
22 | import sk.trupici.gwatch.wear.config.WatchfaceConfig;
23 |
24 | /**
25 | * Displays Analog watch face preview with complication locations.
26 | */
27 | public class AnalogComplicationViewHolder extends ComplicationViewHolder {
28 |
29 | private final static String LOG_TAG = AnalogComplicationViewHolder.class.getSimpleName();
30 |
31 | private ComplicationViews left;
32 | private ComplicationViews right;
33 |
34 | public AnalogComplicationViewHolder(WatchfaceConfig watchfaceConfig, ComplicationsConfigAdapter complicationAdapter, final View view) {
35 | super(watchfaceConfig, complicationAdapter, view);
36 | }
37 |
38 | @Override
39 | protected void initComplicationViews(View view) {
40 | left = new ComplicationViews(view.findViewById(R.id.left_complication), this, this);
41 | right = new ComplicationViews(view.findViewById(R.id.right_complication), this, this);
42 | }
43 |
44 | @Override
45 | protected ComplicationViews getComplicationViews(ComplicationId complicationId) {
46 | switch (complicationId) {
47 | case LEFT:
48 | return left;
49 | case RIGHT:
50 | return right;
51 | default:
52 | return null;
53 | }
54 | }
55 |
56 | @Override
57 | protected ComplicationId getComplicationId(View button) {
58 | if (button.equals(left.complication)) {
59 | return ComplicationId.LEFT;
60 | } else if (button.equals(right.complication)) {
61 | return ComplicationId.RIGHT;
62 | } else {
63 | return null;
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/settings/fragment/AppWidgetGraphFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.settings.fragment;
20 |
21 | import android.os.Bundle;
22 | import android.view.View;
23 |
24 | import androidx.annotation.NonNull;
25 | import androidx.preference.PreferenceCategory;
26 | import androidx.preference.SwitchPreferenceCompat;
27 | import sk.trupici.gwatch.wear.GWatchApplication;
28 | import sk.trupici.gwatch.wear.R;
29 | import sk.trupici.gwatch.wear.common.util.PreferenceUtils;
30 |
31 | public class AppWidgetGraphFragment extends sk.trupici.gwatch.wear.settings.fragment.SettingsFragment {
32 | @Override
33 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
34 | setPreferencesFromResource(R.xml.pref_app_widget_graph, rootKey);
35 | super.onCreatePreferences(savedInstanceState, rootKey);
36 | }
37 |
38 | @Override
39 | public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
40 | if (!TMP_FRAGMENT_TAG.equals(getTag())) {
41 | // show/hide patched LibreLink data source functionality
42 | PreferenceCategory prefCategory = (PreferenceCategory) getPreferenceScreen().findPreference("widget_graph_refresh");
43 | SwitchPreferenceCompat pref = (SwitchPreferenceCompat) prefCategory.findPreference("pref_widget_graph_1min_update");
44 | if (PreferenceUtils.isConfigured(GWatchApplication.getAppContext(), "pref_data_source_libre_visible", false)) {
45 | prefCategory.setVisible(true);
46 | pref.setVisible(true);
47 | } else if (pref != null) {
48 | pref.setChecked(false);
49 | pref.setVisible(false);
50 | prefCategory.setVisible(false);
51 | }
52 | }
53 |
54 | super.onViewCreated(view, savedInstanceState);
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # G-Watch Wear App
3 |
4 | Looking for more comfortable way how to monitor your glucose levels? If you have a Samsung Wear OS smart watch then this is the ideal app for you!
5 |
6 | G-Watch Wear App is a bridge between your CGM app and your Samsung Wear OS watch. It collects glucose values provided by 3rd party CGM applications (Glimp, XDrip+, DiaBox, AndroidAPS, NightScout, Dexcom Share, etc...) and sends collected data to the watch. G-Watch watch faces then display received values to its user.
7 |
8 |
9 | This is the first release of G-Watch App for Wear OS watch models. It is primary focused on Glaxy Watch 4 models as a direct successor of previous TizenOS Galaxy models where the original G-Watch App was used.
10 |
11 | The list of supported features for this release:
12 | - 2 configurable watch faces Digital and Analog.
13 | - collection of backgrounds and watch hands
14 | - BG alarms with vibrations and sounds configurable on the watch
15 | - configurable appearance of components on the watch
16 | - customizable BG graph
17 | - 3rd party complications support.
18 | - adjustable BG thresholds from thr mobile app
19 | - support of xDrip+, Diabox, AndroidAPS, Glimp, BYOD, Juggluco, Nightscout, Dexcom share and LibreLink as a source of BG data.
20 | - integrated BG values complication provider for other watch faces
21 | - phone app widget with current BG value, trend, BG graph and data source indicator
22 |
23 | The list will grow with the next releases.
24 |
25 | ### Current limitations
26 | Compared to original G-Watch App some features are still missing:
27 | - no custom watch face background
28 | - no custom alarm sounds
29 | - only predefined alarm settings for period, snooze time, volume , vibration intensity
30 |
31 | If you have questions or you want to share your experiences with other users, visit our fb group: [G-Watch App Users](https://www.facebook.com/groups/gwatchapp)
32 |
33 |
34 | ## License
35 |
36 | Copyright 2023 Juraj Antal Licensed under the Apache License, Version 2.0 (the "License");
37 | you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
38 | Unless required by applicable law or agreed to in writing, software
39 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
40 |
41 | ## Devoleped By
42 | **[Juraj Antal](mailto:trupici.sk@gmail.com)**
43 |
44 | ## Design and Art Work By
45 | **[Frederik Wagner](https://getwatchmaker.com/user/Bkd6tbYxr)**
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/util/IoUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.util;
20 |
21 | import android.annotation.SuppressLint;
22 | import android.content.Context;
23 | import android.os.Build;
24 | import android.os.VibrationEffect;
25 | import android.os.Vibrator;
26 | import android.os.VibratorManager;
27 |
28 | import androidx.annotation.RequiresApi;
29 |
30 | public class IoUtils {
31 |
32 | private static final long VIBE_DURATION = 200;
33 |
34 | public static void vibrate(Context context) {
35 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
36 | vibrateOld(context, VIBE_DURATION);
37 | } else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
38 | vibrate8(context, VIBE_DURATION);
39 | } else {
40 | vibrate31(context, VIBE_DURATION);
41 | }
42 | }
43 |
44 | @SuppressWarnings("deprecation")
45 | private static void vibrateOld(Context context, long duration) {
46 | Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
47 | vibrator.vibrate(VIBE_DURATION);
48 | }
49 |
50 | @RequiresApi(api = Build.VERSION_CODES.O)
51 | private static void vibrate8(Context context, long duration) {
52 | @SuppressWarnings("deprecation")
53 | Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
54 | vibrator.vibrate(VibrationEffect.createOneShot(VIBE_DURATION, VibrationEffect.DEFAULT_AMPLITUDE));
55 | }
56 |
57 | @RequiresApi(api = Build.VERSION_CODES.S)
58 | private static void vibrate31(Context context, long duration) {
59 | @SuppressLint("WrongConstant")
60 | VibratorManager vibratorManager = (VibratorManager) context.getSystemService(Context.VIBRATOR_MANAGER_SERVICE);
61 | vibratorManager.getDefaultVibrator().vibrate(VibrationEffect.createOneShot(VIBE_DURATION, VibrationEffect.DEFAULT_AMPLITUDE));
62 | }
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/mobile/src/main/java/sk/trupici/gwatch/wear/settings/PreferenceMap.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 Juraj Antal
3 | *
4 | * Originally created in G-Watch App
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package sk.trupici.gwatch.wear.settings;
20 |
21 | import java.util.HashMap;
22 | import java.util.Map;
23 |
24 | import static sk.trupici.gwatch.wear.settings.ConfigData.*;
25 |
26 | public class PreferenceMap {
27 |
28 | public final static Map data = new HashMap() {{
29 | // cfg_... simple configuration / direct mapping
30 | // prefs_... require some logic to get/create configuration
31 |
32 | // glucose levels
33 | put("cfg_glucose_level_hypo", new ConfigData(TAG_GL_THRESHOLD_HYPO, ConfigType.BYTE));
34 | put("cfg_glucose_level_low", new ConfigData(TAG_GL_THRESHOLD_LOW, ConfigType.BYTE));
35 | put("cfg_glucose_level_high", new ConfigData(TAG_GL_THRESHOLD_HIGH, ConfigType.BYTE));
36 | put("cfg_glucose_level_hyper", new ConfigData(TAG_GL_THRESHOLD_HYPER, ConfigType.WORD));
37 | put("cfg_glucose_units_conversion", new ConfigData(TAG_GL_UNIT_CONVERSION, ConfigType.BOOLEAN));
38 |
39 |
40 | // // nightscout config
41 | // put("cfg_nightscout_url", new ConfigData((byte)0xD0, PreferenceType.STRING));
42 | // put("cfg_nightscout_api_secret", new ConfigData((byte)0xD1, PreferenceType.STRING));
43 | // put("cfg_nightscout_token", new ConfigData((byte)0xD2, PreferenceType.STRING));
44 | // put("cfg_nightscout_latency", new ConfigData((byte)0xD3, PreferenceType.BYTE));
45 | //
46 | // // dexcom share config
47 | // put("cfg_dexcom_share_account", new ConfigData((byte)0xD5, PreferenceType.STRING));
48 | // put("cfg_dexcom_share_secret", new ConfigData((byte)0xD6, PreferenceType.STRING));
49 | // put("cfg_dexcom_share_us_account", new ConfigData((byte)0xD7, PreferenceType.BOOLEAN));
50 | // put("cfg_dexcom_share_latency", new ConfigData((byte)0xD8, PreferenceType.BYTE));
51 | //
52 | // // 0xFF - reserved - 2-byte tag indication
53 | }};
54 | }
55 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/menu/ComplicationsMenuItems.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config.menu;
18 |
19 | import sk.trupici.gwatch.wear.R;
20 | import sk.trupici.gwatch.wear.config.complications.ComplicationConfig;
21 | import sk.trupici.gwatch.wear.config.complications.ComplicationConfigItem;
22 | import sk.trupici.gwatch.wear.config.item.BasicConfigItem;
23 | import sk.trupici.gwatch.wear.config.item.ConfigItem;
24 | import sk.trupici.gwatch.wear.config.item.PaddingConfigItem;
25 |
26 | public class ComplicationsMenuItems {
27 | final public static ConfigItem[] items = {
28 | new ComplicationConfigItem(),
29 | new BasicConfigItem(
30 | R.string.config_item_border_shape_label,
31 | R.drawable.config_border_rect_24,
32 | ComplicationConfig.PREF_COMPL_BORDER_SHAPE,
33 | ConfigItem.Type.TYPE_BORDER_TYPE,
34 | R.string.def_compl_border_type),
35 | new BasicConfigItem(
36 | R.string.config_item_border_color_label,
37 | R.drawable.config_color_edit_24,
38 | ComplicationConfig.PREF_COMPL_BORDER_COLOR,
39 | ConfigItem.Type.TYPE_BORDER_COLOR,
40 | R.color.def_compl_border_color),
41 | new BasicConfigItem(
42 | R.string.config_item_text_color_label,
43 | R.drawable.config_color_edit_24,
44 | ComplicationConfig.PREF_COMPL_DATA_COLOR,
45 | ConfigItem.Type.TYPE_DATA_COLOR,
46 | R.color.def_compl_data_color),
47 | new BasicConfigItem(
48 | R.string.config_item_bkg_color_label,
49 | R.drawable.config_color_edit_24,
50 | ComplicationConfig.PREF_COMPL_BKG_COLOR,
51 | ConfigItem.Type.TYPE_BKG_COLOR,
52 | R.color.def_compl_background_color),
53 | new PaddingConfigItem()
54 | };
55 | }
56 |
--------------------------------------------------------------------------------
/wearable/src/main/res/layout/layout_config_item_page.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
27 |
28 |
37 |
38 |
44 |
53 |
61 |
62 |
--------------------------------------------------------------------------------
/wearable/src/main/java/sk/trupici/gwatch/wear/config/menu/BorderTypeMenuItems.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 Juraj Antal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sk.trupici.gwatch.wear.config.menu;
18 |
19 | import sk.trupici.gwatch.wear.R;
20 | import sk.trupici.gwatch.wear.config.item.BorderConfigItem;
21 | import sk.trupici.gwatch.wear.config.BorderType;
22 |
23 | public class BorderTypeMenuItems {
24 | final public static BorderConfigItem[] items = {
25 | new BorderConfigItem(BorderType.NONE,
26 | R.string.border_type_none,
27 | R.drawable.config_no_border_24),
28 | new BorderConfigItem(BorderType.ROUNDED_RECT,
29 | R.string.border_type_round_rect,
30 | R.drawable.config_border_round_rect_24),
31 | new BorderConfigItem(BorderType.RECT,
32 | R.string.border_type_rect,
33 | R.drawable.config_border_rect_24),
34 | new BorderConfigItem(BorderType.RING,
35 | R.string.border_type_ring,
36 | R.drawable.config_border_circle_24),
37 | new BorderConfigItem(BorderType.DASHED_ROUNDED_RECT,
38 | R.string.border_type_dashed_round_rect,
39 | R.drawable.config_border_round_rect_dash_24),
40 | new BorderConfigItem(BorderType.DASHED_RECT,
41 | R.string.border_type_dashed_rect,
42 | R.drawable.config_border_rect_dash_24),
43 | new BorderConfigItem(BorderType.DASHED_RING,
44 | R.string.border_type_dashed_ring,
45 | R.drawable.config_border_circle_dash_24),
46 | new BorderConfigItem(BorderType.DOTTED_ROUNDED_RECT,
47 | R.string.border_type_dotted_round_rect,
48 | R.drawable.config_border_round_rect_dot_24),
49 | new BorderConfigItem(BorderType.DOTTED_RECT,
50 | R.string.border_type_dotted_rect,
51 | R.drawable.config_border_rect_dot_24),
52 | new BorderConfigItem(BorderType.DOTTED_RING,
53 | R.string.border_type_dotted_ring,
54 | R.drawable.config_border_circle_dot_24)
55 | };
56 | }
57 |
--------------------------------------------------------------------------------