Skip to content

Commit

Permalink
Add camera tile to Wear OS (#3870)
Browse files Browse the repository at this point in the history
* [WIP] Prepare camera snapshot tile

* Deduplicate refresh views

* Get/save tile config in the database

* Deduplicate haptic click, add to camera refresh

* [WIP] Camera tile settings UI

 - Create UI to set camera tile settings
 - Reuse shortcut tile settings activity as a general tile settings activity

* Rename camera snapshot tile to camera tile

* Cleanup: camera entities selection, empty state, preview image

 - On initial load also create a list of camera entities to make it possible to select them without showing up elsewhere in the app
 - Add text to empty state instructing the user to set a camera
 - Update tile preview images

* Fix logged out state on missing tile config

* Force tile update on login

* Scale bitmap to fit inside screen size

 - Scale the received image to a bitmap that does not exceed the screen size to ensure timely refreshes and prevent parcels that are too big
  • Loading branch information
jpelgrom committed Sep 17, 2023
1 parent 8d4822a commit 2c20baf
Show file tree
Hide file tree
Showing 25 changed files with 1,879 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fun SettingsWearTemplateTile(
expanded = dropdownExpanded,
onDismissRequest = { dropdownExpanded = false }
) {
val options = listOf(0, 60, 2 * 60, 5 * 60, 10 * 60, 15 * 60, 30 * 60, 60 * 60, 5 * 60 * 60, 10 * 60 * 60, 24 * 60 * 60)
val options = listOf(0, 60, 2 * 60, 5 * 60, 10 * 60, 15 * 60, 30 * 60, 60 * 60, 2 * 60 * 60, 5 * 60 * 60, 10 * 60 * 60, 24 * 60 * 60)
for (option in options) {
DropdownMenuItem(onClick = {
onRefreshIntervalChanged(option)
Expand Down

0 comments on commit 2c20baf

Please sign in to comment.