Commit graph

338 commits

Author SHA1 Message Date
Joris Pelgröm 3e45d43ce0
Fix template tile refresh interval (#2151)
- The saved value is already in seconds, so there is no need to multiply it by 60
2022-01-17 20:14:29 -05:00
leroyboerefijn 131296ad01
Show names on shortcuts tile (#2142)
* Show names on shortcuts tile

* Reorganize shortcuts tile settings
2022-01-17 20:11:47 -05:00
Tiger Oakes 26f700bab2
Use getSystemService extension from Core KTX (#2136)
* Use getSystemService extension from Core KTX

* Replace deprecated bluetooth calls
2022-01-17 20:08:23 -05:00
Joris Pelgröm 050d449ef2
Support MFA during Wear OS standalone login (#2131)
* Initial Wear MFA support

 - Added support for authentication with MFA to the Wear OS login flow
 - Renamed the existing Authentication* stuff to PasswordAuthentication*
 - For the authentication flow, specify a base class used for responses and depending on the response return the appropriate data class that extends the base class

* Add MFA screens

  - Adjusting the existing view to add a new title and input and showing/hiding based on state created a buggy experience on the emulator where the keyboard confirm/next buttons didn't work properly any more, so the MFA input is a full new activity. Copied from the existing activity for username/password.

* Fix MFA activity tools:context

* Move MFA in to the existing AuthenticationActivity

 - Actually it is possible to get the MFA input in the same activity with a little effort, but the end result works great and doesn't use as much duplicate code

* Remove MFA activity, rename PasswordAuthentication* back

 - Remove the MFA activity now that MFA is integrated into the other activity for authentication
 - Rename back PasswordAuthentication* to Authentication* (end result compared to existing app: no change)

* Remove unnecessary JsonIgnoreProperties annotation
2022-01-17 20:01:57 -05:00
leroyboerefijn 3a15c0fb33
Template tile for wear OS (#2122)
* Initial implementation of template tile

Includes settings on phone and watch. Watch settings will be removed in next commit

* Add refresh interval setting to wear app

* Update wear settings layout

* Add interval setting to phone app

* ktlint

* Add example image to the manifest

* Add preview of rendered template in phone settings

* Process review comments

* Use resources for interval strings
2022-01-13 15:04:10 -05:00
Joris Pelgröm 4796284169
Add areas to entity list on Wear (#2118)
* First area implementation for Wear

* Fix import / ktlint

* Area IDs are only nullable in core, not for clients

* A new approach to managing the entity lists

 - Change the approach to getting state lists to support any number of lists per type. By nesting a state list inside the list Compose should still be able to update on any changes. To display, loop through the items.
 - The main view model now filters the main/source entity list that is used everywhere by supported entities to prevent unusable domains from showing up.
 - Fix padding above all entities/settings to make sure that there is still padding even if there are no entities.
 - Temporary fix for favorites/tiles: hardcode the lists used. Should be updated to read items dynamically but I couldn't get the rememberSaveable to work in time.

* Filter entities in EntityListView to keep live updates

 - Keep the updates in the EntityListView always live by allowing filtering the list in the view itself. Without these changes, selecting any domain from the main screen would give a static list because filtering creates a copy of the original.
 - Fix ktlint import ordering

* Listen for registry updates in the main list

 - Subscribe to events for registry updates and update any lists. Compose will take care of updating views if necessary, which basically makes this plug and play.

* Load entities for favorites+tiles dynamically

 - Load all the entities by domain when setting favorites or tiles, instead of using hardcoded references to specific domains. This is a proper fix for the updated list structure introduced in a previous commit.
 - Reuse saving the expanded states of lists from EntityListView because favorites and tiles can now also be any number of headers

* Fix 'All entities' icon filter

* Move names for supported domains

 - For determining which tiles are toggleable we already access the implementation directly so remove todos and move names for those domains over to the implementation to keep everything in one place. The main view model will include a simple function to convert the string ID to an actual string.

* Order area/domain lists alphabetically

 - Create a new observable list that can be used to determine the order in which to display the list or areas/entities. A mutableMapOf in Kotlin by default respects the insert order but it looks like the mutableStateMapOf doesn't follow that as the items are already inserted alphabetically.
 - Allow passing in a list order for the EntityListView to prevent entities from suddenly ending up in a different place on a different screen

* Order entities in area, util object for area

 - Order the list of entities displayed in one area alphabetically by their friendly name instead of domain, as it would otherwise still use domains internally to sort but not show them which is not a good experience.
 - Create an util object in the common package for getting the area of an entity, as the same code was used both in the device controls and Wear main list.

* Restore domain descriptions to original (plural)
2022-01-11 21:26:12 -05:00
zmarties 43b53923ab
Add a work profile sensor (#2026)
* Add a work profile sensor

The information on whether the work profile is available only seems to
be given by tracking the state of the last received broadcast intent
indication - MANAGED_PROFILE_[UN]AVAILABLE

Thus add a receiver for these intents, and slightly change the architecture
so that the intent can be passed down when the sensor needs to be updated.

I think there's a ineffciency in the architecture - currently all
sensors are asked to update whenever any broadcast the app tracks is
received, regardless of whether than broadcast is relevant to the the
sensor or now - for example all sensors update when battery state changes.

* Revert typo fix to keep this PR focused.

* Pass lint checks
2021-12-31 07:53:07 -05:00
Daniel Shokouhi 02e4efeb9f
Catch the failure on devices without rotary input (#2092) 2021-12-31 07:41:34 -05:00
Justin Bassett 476bd8984a
Work on error handling from Websocket. (#2091)
* Work on error handling from Websocket.

* Fix wear build.
2021-12-30 15:55:35 -05:00
SkechyWolf 99a7ca1e56
Exit app when back is pressed on Screen_Landing (#2077)
* Exit app when back is pressed on Sreen_Landing

* Fix imports
2021-12-26 20:55:36 -05:00
dependabot[bot] 0f984e8b83
Bump kotlinx-coroutines-guava from 1.5.2 to 1.6.0 (#2071)
Bumps [kotlinx-coroutines-guava](https://github.com/Kotlin/kotlinx.coroutines) from 1.5.2 to 1.6.0.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.5.2...1.6.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-24 07:23:09 -05:00
dependabot[bot] 60d2cc140e
Bump kotlinx-coroutines-android from 1.5.2 to 1.6.0 (#2063)
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.5.2 to 1.6.0.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.5.2...1.6.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-24 07:21:36 -05:00
Daniel Shokouhi afa092b3c0
Bump dependencies and make required changes (#2030)
* Bump dependencies and make required changes

* Fix lint
2021-12-24 07:18:43 -05:00
SkechyWolf 6947db0878
Fix back button crash on Screen_Landing (#2052) 2021-12-21 21:25:24 -05:00
dependabot[bot] 84eea6967f
Bump jackson-module-kotlin from 2.13.0 to 2.13.1 (#2031)
Bumps [jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) from 2.13.0 to 2.13.1.
- [Release notes](https://github.com/FasterXML/jackson-module-kotlin/releases)
- [Commits](https://github.com/FasterXML/jackson-module-kotlin/compare/jackson-module-kotlin-2.13.0...jackson-module-kotlin-2.13.1)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.module:jackson-module-kotlin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-21 09:14:18 -05:00
SkechyWolf 9bd9ed4eb0
Add Back button support to Wear os (#2039) 2021-12-21 09:13:34 -05:00
dependabot[bot] a4317af7df
Bump kotlin-stdlib-jdk8 from 1.6.0 to 1.6.10 (#2009)
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.6.0 to 1.6.10.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-14 11:05:00 -05:00
Daniel Shokouhi 55e5ae3597
Fix some sentry wear bugs and add some logs with a toast (#2007)
* Fix some sentry wear bugs and add some logs with a toast

* Review comments
2021-12-14 11:03:51 -05:00
Justin Bassett 8c5149ddcb
Allow Phone to Onboard Wear Device (#2002)
* Initial data flowing.

* Functional login from phone.

* Cleanup data transfer between devices.

* Fix minimal build.

* Address review comments.

* Defaults to actual device when logging in now.
Location hidden when logging into wear device.
2021-12-10 21:27:56 -05:00
dependabot[bot] 949aebe3d5
Bump hilt-android from 2.40.2 to 2.40.5 (#1993)
Bumps [hilt-android](https://github.com/google/dagger) from 2.40.2 to 2.40.5.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.40.2...dagger-2.40.5)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-08 20:57:55 -05:00
dependabot[bot] 278beeef58
Bump hilt-android-compiler from 2.40.2 to 2.40.5 (#1992)
Bumps [hilt-android-compiler](https://github.com/google/dagger) from 2.40.2 to 2.40.5.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.40.2...dagger-2.40.5)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android-compiler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-08 20:55:55 -05:00
Daniel Shokouhi f800c85b52
Allow favorite entities to be dragged and dropped for reordering from phone settings (#1963)
* Allow favorite entities to be dragged and dropped for reordering

* Switch favorites to store in DB, fix reordering

* UI updates to reflect draggable items

* Send a json array instead of just a string, add lock domain to settings

* Only add favorites if we have them from the phone

* Remove missing entities, fix initial duplicate load

* Remove redundant work manager bump from phone

* Fix flow of favorites and remaining issues

* Build fixes

* Switch back checked variable
2021-12-08 20:52:51 -05:00
leroyboerefijn ab6cf02671
Wear redesign (#1970)
* First color and padding updates

* Add matrial theme

* Remove `setChipDefaults` and ktlint

* Further updates to colors and paddings

* Larger space with unicode "em space"

* Move logout button to settings and adjust padding again

* Update MainView and move entity domain lists to MainViewModel

* Animated TimeText

* Fix merge issues

* Process review comment and hide empty domains in all entities view

* Put in quick fix for showing lock state in ToggleChip
2021-11-29 21:04:58 -05:00
Justin Bassett 0555367c65
Move Strings to Common (#1971)
* Move all strings to common to make translations easier.

* Update lokalise github action.
2021-11-27 20:34:04 -05:00
dependabot[bot] ded624d1a0
Bump hilt-android from 2.40.1 to 2.40.2 (#1965)
* Bump hilt-android-gradle-plugin from 2.40.1 to 2.40.2

Bumps [hilt-android-gradle-plugin](https://github.com/google/dagger) from 2.40.1 to 2.40.2.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.40.1...dagger-2.40.2)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump hilt-android from 2.40.1 to 2.40.2

Bumps [hilt-android](https://github.com/google/dagger) from 2.40.1 to 2.40.2.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.40.1...dagger-2.40.2)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump hilt-android-compiler from 2.40.1 to 2.40.2

Bumps [hilt-android-compiler](https://github.com/google/dagger) from 2.40.1 to 2.40.2.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.40.1...dagger-2.40.2)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android-compiler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
2021-11-27 14:34:58 -05:00
leroyboerefijn 31d07bbbeb
Wear os add lock domain (#1959)
* Add non-functional example of favorites tile

* Load real scene entities into the Tile

* Make the tile buttons actionable

* Add icons of the entities

* Add tile preview image

* Also support fewer than 7 entities

* Cleanup and pass ktlint formatting

* Add support for lock domain

* Pass along state to HomePresenter

* Add lock to toggleDomains

* Revert "Merge branch 'home-assistant-master' into wear-os-add-lock"

This reverts commit b446006c00, reversing
changes made to a65b4e03e8.
2021-11-27 13:09:43 -05:00
Timothy Kist a42cb8ab05
Add Wear OS battery sensors (#1890)
* Move database to common module

* Fix lint

* Better kapt error reporting

* Alias common module's resources into app

* Move base sensor receiver & worker to common module

* Add sensor receiver & worker to wear module

* Schedule sensors Worker on app start up

* Export the SensorReceiver in the wear manifest

* Upgrade base and wear sensors Receivers and Workers to Hilt + hoist updateSensors to sensors Receiver base + introduce base location manager + fix minimal sensor stubs

* Re-add important battery sensor info

* Remove unused imports

* Listen for battery updates in wear app

* Listen for screen updates in wear app

* Fix ktlint

* Add sensors to wear OS on home screen

* Stop listening to screens and power save mode

The sensor isn't added yet

* Remove commented code due to absent sensors... for now. Mwahahaha!

* Remove unused import
2021-11-27 13:08:26 -05:00
Daniel Shokouhi a88704ae24
Editing wear favorites from the phone (#1908)
* Begin work on editing favorites from the phone

* Get list of entities and show alongside favorites

* Fix minimal build

* Fix minimal build again

* Another fix attempt

* Lint

* Send and save favorites from phone to wear

* Add TopAppBar, make row clickable, minor clean up

* Add landing view, navigation and major cleanup

* Add some previews, fix missing entities, more refactoring

* Remove unused method

* Remove TODOs

* Switch to hilt

* Review comments: Fix favorite deselection, update favorits in onResume

* Review comment: remove unused code

* Review comments

* More review comments

* Correct spelling

* Apply code review to PhoneSettingListener

* Remove unneeded thread calls
2021-11-22 20:51:48 -05:00
leroyboerefijn ca52af740c
Add haptic feedback to shortcut tile (#1960) 2021-11-22 20:35:57 -05:00
dependabot[bot] aa180a8fc3
Bump okhttp from 4.9.2 to 4.9.3 (#1952)
Bumps [okhttp](https://github.com/square/okhttp) from 4.9.2 to 4.9.3.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.9.2...parent-4.9.3)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-22 20:34:52 -05:00
Daniel Shokouhi 65d6d7d270
Fix default icon for shortcut tile (#1951) 2021-11-22 20:34:17 -05:00
Daniel Shokouhi d907948512
Bump wear libraries (#1946) 2021-11-20 15:50:44 -05:00
SkechyWolf b87f239f19
Change splash screen icon (#1909) 2021-11-18 20:56:31 -05:00
Justin Bassett 672e49b6fb
Hilt Upgrade (#1933)
* Onboarding and webview work with Hilt!

* App fully on Hilt, next up Wear OS!

* Wear now on Hilt.

* Upgrade hilt.
Fix lint errors.
2021-11-16 11:06:19 -05:00
dependabot[bot] 912ae9605b
Bump dagger-compiler from 2.40 to 2.40.1 (#1929)
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.40 to 2.40.1.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.40...dagger-2.40.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-15 18:04:51 -05:00
dependabot[bot] b88d7f6830
Bump community-material-typeface from 5.8.55.0-kotlin to 6.4.95.0-kotlin (#1930)
Bumps [community-material-typeface](https://github.com/mikepenz/Android-Iconics) from 5.8.55.0-kotlin to 6.4.95.0-kotlin.
- [Release notes](https://github.com/mikepenz/Android-Iconics/releases)
- [Changelog](https://github.com/mikepenz/Android-Iconics/blob/develop/gradle-release.gradle)
- [Commits](https://github.com/mikepenz/Android-Iconics/commits)

---
updated-dependencies:
- dependency-name: com.mikepenz:community-material-typeface
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-15 18:04:08 -05:00
dependabot[bot] 06926ffd38
Bump dagger from 2.40 to 2.40.1 (#1927)
Bumps [dagger](https://github.com/google/dagger) from 2.40 to 2.40.1.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.40...dagger-2.40.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-15 18:03:10 -05:00
dependabot[bot] ef5f033d76
Bump iconics-compose from 5.3.2 to 5.3.3 (#1928)
Bumps [iconics-compose](https://github.com/mikepenz/Android-Iconics) from 5.3.2 to 5.3.3.
- [Release notes](https://github.com/mikepenz/Android-Iconics/releases)
- [Changelog](https://github.com/mikepenz/Android-Iconics/blob/develop/gradle-release.gradle)
- [Commits](https://github.com/mikepenz/Android-Iconics/compare/v5.3.2...v5.3.3)

---
updated-dependencies:
- dependency-name: com.mikepenz:iconics-compose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-15 17:47:36 -05:00
leroyboerefijn c22e078559
Fix default icon and move to broadcast receiver (#1926) 2021-11-15 17:41:43 -05:00
dependabot[bot] 576518e32f
Bump kotlinx-coroutines-guava from 1.5.1 to 1.5.2 (#1923)
Bumps [kotlinx-coroutines-guava](https://github.com/Kotlin/kotlinx.coroutines) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.5.1...1.5.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-15 17:36:52 -05:00
dependabot[bot] c0920928fd
Bump iconics-core from 5.3.2 to 5.3.3 (#1921)
Bumps [iconics-core](https://github.com/mikepenz/Android-Iconics) from 5.3.2 to 5.3.3.
- [Release notes](https://github.com/mikepenz/Android-Iconics/releases)
- [Changelog](https://github.com/mikepenz/Android-Iconics/blob/develop/gradle-release.gradle)
- [Commits](https://github.com/mikepenz/Android-Iconics/compare/v5.3.2...v5.3.3)

---
updated-dependencies:
- dependency-name: com.mikepenz:iconics-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-15 17:34:35 -05:00
Daniel Shokouhi e2e361930d
Add sorting, split by category, add collapsing categories (#1919) 2021-11-14 14:11:34 -05:00
Daniel Shokouhi fe3bbdf112
Sort entities, add time and headers in wear settings (#1912)
* Sort entities, add time and headers in wear settings

* Review comment
2021-11-14 11:24:12 -05:00
Justin Bassett 1e5534de68
Wear OS Instant Updates (#1907)
* Migrate to maps for entities to make life easier.

* Websocket all the things!
2021-11-11 16:56:45 -05:00
leroyboerefijn 3d909c621d
Wear OS shortcut Tile (#1842)
* Add non-functional example of favorites tile

* Load real scene entities into the Tile

* Make the tile buttons actionable

* Add icons of the entities

* Add tile preview image

* Also support fewer than 7 entities

* Cleanup and pass ktlint formatting

* Add settings page for tile shortcuts

* Use new settings in Tile

* Make the tile update when the settings are changed

* Support all types of entities in TileActionActivity

* Rename tile and process comments

* ktlint

* Update layout of settings a bit

* Use a string resource like a normal person

* Remove remaining SetTitle instances

* Process review comments and add data class to store entity strings

* Process review comments

* tiny ktlint fix

* Fix broken previews

* Fix white lines after merge

* Move tile refresh to compose function.

* Fix crash when missing friendly name or icon.

* ktlint...

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
2021-11-11 16:09:32 -05:00
Daniel Shokouhi 27627fad49
Add settings for wear haptic feedback and toast on entity selection (#1893)
* Add settings for wear haptic feedback and toast on entity selection

* Lint

* Implement review suggestions.

* Add preview functions for easy UI viewing in Android Studio (#1901)

* Add settings for wear haptic feedback and toast on entity selection

* Merge in review fixes

* Lint

* Remove duplicate calls

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
2021-11-11 12:48:11 -05:00
Daniel Shokouhi b060f0c7f4
Add preview functions for easy UI viewing in Android Studio (#1901) 2021-11-11 11:16:49 -05:00
Daniel Shokouhi f419778e80
Load a temporary favorite chip for each entity ID until we get entities (#1899)
* Load a temporary favorite chip for each entity ID until we get entities

* Lint
2021-11-10 23:07:16 -05:00
Daniel Shokouhi 894a3e8a1d
Add the time, make better use of list headers on Wear (#1900) 2021-11-10 22:03:11 -05:00
HunterX86 705a974c95
Fixing splash screen (#1896)
Changed splash logo and accent color
2021-11-10 21:37:01 -05:00
Justin Bassett 4fdbe7214a
Major Wear Cleanup (#1895)
* Better state hoisting.

* Broke down compose items and removed dependant state.

* Functional minus favorites....

* Favorites working, not my best solution.

* Breaking more stuff down.

* ktlint.
2021-11-10 09:35:10 -05:00
SkechyWolf eb3585b305
Fixing Splash screen so it isn't blurry and adding rounded edges (#1894)
* Fixing Splash screen so it isn't blurry and adding roundness

* Fixes filename mistake
2021-11-09 23:44:53 -05:00
Justin Bassett ba8345a3cf
Initial WebSocket Implementation (#1884)
* Initial setup of WebSockets!

* Got some good sets of table tennis going.

* Move to a more kotlin friendly way to lock.

* Functional get config call.

* Remove testing function.

* Linting.

* Migrate get config calls to websockets!

* Working retries.

* Get services now as websocket request.

* Remove unused service call via api.

* Fix issue with widget not prompting the correct items.

* Migrate to websocket get states.

* ktlint.

* Review Comments.
2021-11-09 20:44:05 -05:00
Daniel Shokouhi 86c12799e7
Allow categories in Wear to be collapsed and expanded for easier navigation (#1886)
* Allow categories in Wear to be collapsed and expanded for easier navigation

* Small tweak
2021-11-09 15:46:38 -05:00
Daniel Shokouhi 2999d220a8
Add a splash screen to Wear to improve cold start experience (#1889) 2021-11-09 09:47:25 -05:00
Daniel Shokouhi 2c5e762504
Add settings and favorites for wear so users can quickly execute actions they do regularly faster (#1875)
* Add settings and favorites for wear

* Use proper variable for navigation

* Refactoring to remove clutter from HomeActivity

* Always start set favorites at the top

* Review comments

* Correct merge mistake

* Add rotary input on set favorites screen
2021-11-09 09:41:23 -05:00
Daniel Shokouhi 588e74113d
Bring back rotary input support for home screen (#1887) 2021-11-07 21:32:06 -05:00
Daniel Shokouhi 4e3d8ce852
Add a short delay and update entities again on wear homescreen (#1870) 2021-11-03 23:09:45 -04:00
Tiger Oakes 5f87d10846
Replace kotlinx.android.synthetic with viewbinding (#1840)
* Replace kotlinx.android.synthetic with viewbinding

* Remove kotlin-android-extensions

* Replace findViewById calls with viewbinding
2021-11-03 23:01:46 -04:00
Daniel Shokouhi 8aee9d11b1
Move entities call back to presenter, use ToggleChip for toggle domains (#1868)
* Move entities call back to presenter, use ToggleChip for toggle domains

* Bump compose libraries and minor cleanup

* Review comments
2021-11-03 21:42:30 -04:00
dependabot[bot] 6c1f1f3e0c
Bump dagger-compiler from 2.39.1 to 2.40 (#1861)
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.39.1 to 2.40.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.39.1...dagger-2.40)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-02 21:08:18 -04:00
dependabot[bot] b36cc0a5a3
Bump dagger from 2.39.1 to 2.40 (#1860)
Bumps [dagger](https://github.com/google/dagger) from 2.39.1 to 2.40.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.39.1...dagger-2.40)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-02 20:58:22 -04:00
Daniel Shokouhi b6e0837cc4
Convert wear home activity to compose (#1844)
* Convert wear home activity to compose

* Bump compose libraries and make UI consistent

* UI fixes based on review comments

* Use chip overflow and max lines instead of take

* Bump activity compose dependency in wear

* Clean up old files

* Remove more unused files

* Pass entities into composable and use rememberSaveable for the lists

* Move getEntities to ViewModel for recomposition

* Restore onViewReady changes

* Add a loading screen while waiting on viewmodel
2021-11-02 20:52:28 -04:00
Daniel Shokouhi e3cc165c79
Only load MDI icons on wear, otherwise load default (#1816)
* Only load MDI icons on wear, otherwise load default

* Combine conditions

* Update wear/src/main/java/io/homeassistant/companion/android/viewHolders/EntityButtonViewHolder.kt

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
2021-10-21 00:39:43 -04:00
Daniel Shokouhi f7883bebc5
Add Wear OS Settings section (#1796)
* Add Wear OS Settings section

* Fix minimal build

* Fix PR build and hide category by default

* Mention Wear OS app is only offered as a beta in case user is unable to install

* Review comments
2021-10-20 22:34:29 -04:00
leroyboerefijn 652b8eb576
Support custom icons (#1799) 2021-10-20 17:52:58 -04:00
Daniel Shokouhi b8994b744d
Some fixes for empty entity lists in wear (#1789)
* Some fixes for empty entity lists in wear

* Review comments
2021-10-18 15:08:46 -04:00
Daniel Shokouhi 9f3f552155
Add auto back up rules for wear (#1790) 2021-10-15 20:47:56 -04:00
Daniel Shokouhi fc8f10afbc
Add network security config for wear app (#1787) 2021-10-15 07:14:49 -05:00
apo-mak 7a026c4f53
Wear - add Lights (#1783)
* add lights entity

* implement filter from 9891c92d01
code clean up.

* Add On/Off Logic (if state)

* fix code ktlint base on https://github.com/home-assistant/android/pull/1783/checks?check_run_id=3894949865

* fix code ktlint base on https://github.com/home-assistant/android/pull/1783/checks?check_run_id=3894949865

* remove "if state" and add "callService toggle"

* remove "if state" and add "callService toggle"
2021-10-14 21:29:31 -04:00
Bassett, Justin cbf217c51a Try something else for publishing. 2021-10-13 23:46:49 -04:00
Justin Bassett 23329d90cb
Make sure to only commit once: https://github.com/Triple-T/gradle-play-publisher/issues/217 (#1781) 2021-10-13 23:17:32 -04:00
Justin Bassett 8fbc55e97b
Enable publishing the Wear OS to Beta. (#1772)
* Enable publishing the Wear OS to Beta.

* Make versionCode different for wear app.
2021-10-13 22:42:23 -04:00
Justin Bassett 51df8dd9a8
Dependency upgrades (#1775)
* Dependency upgrades

* Upgrade compile sdk.
2021-10-13 20:58:14 -04:00
apo-mak f51d7ef92c
add focus,for rotary input (#1780)
add focus,for rotary input.
#1779
2021-10-13 20:55:55 -04:00
Daniel Shokouhi 4893a293bb
Sort entity list and add debug resources for wear app (#1778) 2021-10-13 20:55:37 -04:00
Justin Bassett 1eb826cbcc
Cleanup deprecated build files. (#1774)
* Cleanup deprecated build files.

* ktlint
2021-10-12 23:35:05 -04:00
leroyboerefijn 1573c2e796
Wear os scenes and scripts support (#1763)
* Implement scenes in home activity as a clickable list

* Add ripple effect to list items

* Add scripts as well
2021-10-12 22:30:40 -04:00
dependabot[bot] 0841dd5d94
Bump dagger-compiler from 2.39 to 2.39.1 (#1752)
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.39 to 2.39.1.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.39...dagger-2.39.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-07 18:32:43 -04:00
dependabot[bot] 4cb5f5d679
Bump dagger from 2.39 to 2.39.1 (#1751)
Bumps [dagger](https://github.com/google/dagger) from 2.39 to 2.39.1.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.39...dagger-2.39.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-07 18:25:13 -04:00
dependabot[bot] 7fd58a9b70
Bump dagger from 2.38.1 to 2.39 (#1736)
Bumps [dagger](https://github.com/google/dagger) from 2.38.1 to 2.39.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.38.1...dagger-2.39)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-30 21:46:02 -04:00
dependabot[bot] 59ecaba7c2
Bump dagger-compiler from 2.38.1 to 2.39 (#1735)
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.38.1 to 2.39.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.38.1...dagger-2.39)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-30 21:38:34 -04:00
leroyboerefijn 5f904b980e
Wear os authentication (#1691)
* Initial proof-of-concept: sharing Session over data layer

* Add initial onboarding and login flow

In onboarding, the home assistant urls are received from connected devices. If the user clicks on it, the authentication flow starts.
The user can alter the login details and proceed to login.
The authentication uses the "auth/login_flow" api, instead of the normal authentication api, since there is no support for webview on wear os.

* Clean up wear and app communication

Clean up

* Add proof of authentication on home. And add logout button on home

* Update onboarding list

* Add loading views and error messages

* Move startup logic to HomeActivity to hopefully save some resources

* Add manual setup option and improve UI

* Cleanup

* Passing ktLintCheck

* Passing ktLintCheck after rebase

* Fix building after build.gradle changes during rebase

* Process review comments

Remove multiple product flavors
Remove unnecessary log
Replace margin with additional header
2021-09-30 20:41:22 -04:00
Justin Bassett 2da4578f79
Update to use latest Android Gradle Plugin. (#1655)
* Update to use latest Android Gradle Plugin.
This includes updating to use Java 11.
Also bump a test dep.

* Bump Dagger

* Naming of task for JDK Setup.

* Disable test.... scopes stink for testing.

* ktlint.
2021-08-06 21:41:30 -04:00
Justin Bassett c5ebd99a48
Dependency Updates. (#1643)
* Dependency Updates.
Needed to correctly call for Firebase Token in ioScope not main.

* Bump coroutines test dep as well.
2021-07-25 20:56:58 -04:00
Justin Bassett 151957436c
Fix Playstore Publish and add Dependabot (#1621)
* Fix GPP error and remove deprecated repos.

* Migrate off Config.kt so we can enable dependabot.

* Add Dependabot config.
2021-07-25 15:33:59 -04:00
Nelson Osacky 89457c5fe0
Bump AGP, Gradle and Kotlin Versions (#1563) 2021-06-08 14:58:50 -04:00
Justin Bassett 3b614548d6
Feature/wear publishing (#1264)
* Cleanup .gitignore

* Move to just wear rather than wearos_app.

* Try to use lots of wildcards for debug pr build archiving.
2020-12-27 22:04:37 -05:00