Commit Graph

304 Commits

Author SHA1 Message Date
Daniel Shokouhi
a15f7b3bc4
Add missing scroll bar to remaining screens (#3895)
* Add missing scroll bar to remaining screens

* Add Scaffold to ThemeLazyColumn

* Remove unneeded variable

* Remove nested scaffold
2023-09-29 08:29:56 -04:00
Joris Pelgröm
2f777a1379
ListHeader: fix text cut off (#3898)
ListHeader: set overflow, limit lines based on font size

 - Set overflow for ListHeader to ellipsis instead of cutting of text
 - Set the maximum number of lines for ListHeader based on the font size
 - Center text in the list header for nicer appearance in case of multiple ines
2023-09-28 17:40:39 -04:00
Joris Pelgröm
4a4cc31b97
Update icon (#3888)
* Update icon

 - Replace old icon with the new icon
 - Update app primary color to new blue tint
 - Deduplicate resources

* Update feature graphic

* Decouple app icon color from main color
2023-09-28 17:38:48 -04:00
Joris Pelgröm
43cc4d4a73
Fix rotary input after first screen & for picker (#3881)
- The recent switch to Horologist modifiers for rotary input broke after the first screen because of manual focus requesting, and the refresh interval picker in general so also switch that to a Horologist modifier.
2023-09-20 19:42:20 -04:00
Dubzer
20f87c810b
Add smooth scrolling for rotary input (#3876) 2023-09-19 15:39:25 -04:00
Joris Pelgröm
3915ec6d8f
Automatically fix broken registrations/webhooks (#3875) 2023-09-19 15:38:50 -04:00
Joris Pelgröm
2c20baf0f5
Add camera tile to Wear OS (#3870)
* [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
2023-09-17 16:57:33 -04:00
Daniel Shokouhi
90bf7369e2
Clean up some left over code after update to getIcon (#3827) 2023-08-31 19:53:10 -04:00
Daniel Shokouhi
bb58a578dd
Use unavailable and unknown states consistently when dealing with sensors and entities (#3821)
* Use unavailable and unknown states consistently when dealing with sensors and entities

* Update more sensors

* Remove unused import
2023-08-28 17:43:25 -04:00
Daniel Shokouhi
6c2e555e57
Various changes to entity usage (#3816)
* Various changes to entity usage

* Remove unneeded code

* String fixes

* Remove redundant string
2023-08-26 16:53:31 -04:00
Joris Pelgröm
cde8dc9ee9
More dependency bumps (#3815) 2023-08-26 16:42:20 -04:00
Joris Pelgröm
fb71b9c788
Update to Kotlin 1.9/Compose 1.5/Compose Wear 1.2/AGP 8.1.1 (#3814)
- Update to Kotlin 1.9
 - Update to Compose 1.5 and Compose Wear 1.2, both depend on and are required for Kotlin 1.9. Compose Wear includes lazy classes moving to a different package so updated imports.
 - Update to AGP 8.1.1 to remove compatibility warning
 - Update Navigation Compose to 2.7.1 as it uses Compose 1.5 internally
 - Update Accompanist to 0.32 as it uses Compose 1.5 internally
 - Switch Room to KSP instead of kapt because this (latest stable) release doesn't work with Kotlin 1.9 otherwise. As a result, we no longer need to specifically enable incremental compilation.
2023-08-24 14:51:29 -04:00
Daniel Shokouhi
1bdbd3f2ce
Android Auto: Set icon color when entity is considered in an active state (#3805)
* Android Auto: Set icon color when entity is considered in an active state

* Add link to frontend code for determing active state

* Add lawn_mower domain and a check on supported colored domains

* Split up isActive and state colored domains

* Update map screen
2023-08-24 14:43:10 -04:00
Joris Pelgröm
7f14582909
Add 'toggle' tap action to entity state widget (#3798)
* [WIP] Widget tap action: toggle entity

* Add feedback on press and failure

* Share code for pressing on entities

* Align cover press action

 - Toggle will stop if possible when opening/closing if supported so prefer toggle instead of open/close

* Toggle by default if supported

 - Set the default tap action for supported entities to toggle instead of refresh

* Update widget description
2023-08-19 19:24:44 +00:00
Joris Pelgröm
01326db427
Discard notifications when not registered to prevent crash (#3784)
* Discard notifications when not registered to prevent crash

* Add same check to Wear
2023-08-11 19:22:29 +00:00
Joris Pelgröm
cea54d6895
Stop TTS playback on new Assist pipeline run (#3778) 2023-08-11 11:31:17 -04:00
Daniel Shokouhi
256835a380
Add update sensors notification command to Wear OS (#3774) 2023-08-10 13:55:54 -04:00
Joris Pelgröm
add1955901
Assist last used: remember STT and record proactively (before connected) (#3755)
Assist last used: remember STT and record before connected

 - For the last used pipeline for Assist, remember whether or not it supports STT input, and if it does start recording proactively/as soon as possible to avoid missing voice input while doing network checks.
 - Fix potential wrong server while sending voice data.
 - Fix voice input remaining active after getting an error response.
2023-08-04 10:59:27 -04:00
Justin Bassett
b0deb6de77
Migrate deploys to Fastlane (#3745)
* Migrate deploys to Fastlane

* Couple minor fixes to onPush.yml

* Copy paste is hard
2023-08-01 11:08:12 -04:00
Justin Bassett
1a6c2b94d2
Initial work on migrating plugins to catalogs. (#3737)
* Initial work on migrating plugins to catalogs.

* Remove Enterprise Build profiling since we really don't use it.

* Use a common Java Version and sdk versions.

* ktlint

* Review comments.
2023-07-31 20:35:39 -04:00
Joris Pelgröm
670b17e76c
Apply various IDE code quality suggestions (#3734) 2023-07-31 15:17:42 -04:00
Joris Pelgröm
0800e9b402
Allow selecting unavailable entities for complications/tiles (#3733)
Fix: allow selecting unavailable entities for complications/tiles

 - It should be possible to choose an unavailable entity for display on a complication or tile, as you can with favorites, and even entities that are available now can become unavailable later
2023-07-31 15:15:31 -04:00
Márton Maráz
a8a7363317
Implement support for multiple Shortcut Tiles on Wear OS (#3697)
* Extract JSONArray -> List<String> conversion to extension fun

* Refactor navigation around Shortcuts Tile settings

* Add ShortcutsTileId enum class

* Introduce multiple ShortcutTile subclasses and modify settings UI and storage to support multiple Tiles

* Check if correct ShortcutsTileId is passed as parameter to BaseShortcutTile

* Update TileUpdateRequester usages to account for multiple Tiles

* Add entity count to Shortcut Tile list in Settings

* Fix ktlint errors

* Fix more ktlint errors

* Extract string resource

* Add MULTI_INSTANCES_SUPPORTED to ShortcutsTile to be able to use any number of Tiles

* Refresh the list of Shortcut Tiles in the Settings without needing to restart the app

* Remove test logs

* Update androidx.wear.tiles:tiles to the latest version which doesn't yet require API 34 compileSdk version

* Fix crash when the preference's value is "{}"

* Fix crash when key String is "null" and converting to Int

* Rename placeholder variable name

* Add a comment explaining why to save the tiles in a getter

* Return emptyList() directly for clarity

* Remove icons from "Shortcut tile #n" entries in Settings

* Pass emptyList instead of using the non-null assertion operator to prevent NPEs in edge cases

* Refactor getTileShortcuts and getAllTileShortcuts in WearPrefsRepositoryImpl.
Make the code more readable and understandable, and reduce code duplication.

* Make it explicit that intKey is only intended to be null if stringKey == "null"

* Rename getTileShortcuts to getTileShortcutsAndSaveTileId and make it save the tileId not only when there's a null key in the map, but also when the tileId is not yet in the map. This way, actual Tiles and the tileId keys will be more in sync.

* Handle adding Shortcuts Tile immediately after updating the app to a new version which introduces support for multiple Shortcuts Tiles.

* Show message in the Settings when there are no Shortcuts tiles added yet.

* Refine message in the Settings when there are no Shortcuts tiles added yet

* WIP: ConfigShortcutsTile action

* Update comments about Wear OS versions

* Finalize ConfigShortcutsTile feature by applying @jpelgrom's suggestion to OpenShortcutTileSettingsActivity

* Only wrap the code in runCatching which is expected to throw an Exception under normal circumstances, when the pref value needs to be migrated from the old format.

* Call getTileShortcutsAndSaveTileId in OpenShortcutTileSettingsActivity

* Remove unnecessary stuff
2023-07-31 15:14:01 -04:00
Justin Bassett
ba3170362e
First Steps into making Gradle Catalogs (#3724)
* First Steps into making Gradle Catalogs

* Rename a couple dependencies.

* Downgrade compose compiler since it'll take more to bump the kotlin version apparently.

* Code review comments.

* Refactoring these are painful.

* Now I know my ABC, next time wont you sing with me....
2023-07-29 11:11:08 -04:00
Daniel Shokouhi
54836c8db2
Bump some project dependencies (#3718) 2023-07-27 15:42:50 -04:00
Sebastian Lövdahl
3db34ec408
Show measurement unit in Wear OS complication (#3703)
* Show measurement unit in Wear OS complication

* Extend existing `friendlyState` method

* Make showing unit configurable (defaulting to false)

* Feedback fixes
2023-07-25 14:37:31 -04:00
Joris Pelgröm
32cfa31d86
Update/replace deprecations and unused code in wear module (#3699) 2023-07-24 10:29:42 -04:00
Joris Pelgröm
e4f697fc3b
Resume Assist voice input on new intent (as assistant app/brought to front) (#3692)
* Resume Assist voice input on new intent (as assistant app/brought to front)

* Use constants for android.intent.action.ASSIST

 - android.intent.action.VOICE_ASSIST is marked as internal
2023-07-21 14:11:57 -04:00
Justin Bassett
c4da52bdab
Hilt Dependency Update (#3681)
* Bump com.google.dagger:hilt-android-gradle-plugin from 2.46.1 to 2.47

Bumps [com.google.dagger:hilt-android-gradle-plugin](https://github.com/google/dagger) from 2.46.1 to 2.47.
- [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.46.1...dagger-2.47)

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

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

* Bump com.google.dagger:hilt-android-compiler from 2.46.1 to 2.47

Bumps [com.google.dagger:hilt-android-compiler](https://github.com/google/dagger) from 2.46.1 to 2.47.
- [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.46.1...dagger-2.47)

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

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

* Bump com.google.dagger:hilt-android from 2.46.1 to 2.47

Bumps [com.google.dagger:hilt-android](https://github.com/google/dagger) from 2.46.1 to 2.47.
- [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.46.1...dagger-2.47)

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

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 15:35:11 -04:00
Joris Pelgröm
ef916f606b
Breaking change: support last_used/preferred pipeline IDs and use last_used by default (#3669)
Support last_used/preferred pipeline IDs and use last_used by default
2023-07-18 18:42:36 -04:00
Joris Pelgröm
00c2ef6d9e
Add toggle for Assist as assistant app on Wear (#3663)
Add toggle for assistant app intent filter on Wear

 - Adds a toggle for enabling/disabling Assist as an assistant app (= intent filter on Assist activity), as users may not be able to change the app used after choosing 'Always' and Wear OS 2 doesn't ask the user which app to use which can result in Assist instead of the Google Assistant being forced.
2023-07-17 08:10:15 -04:00
Joris Pelgröm
bc103636db
Update/replace deprecations in app module (#3661) 2023-07-17 08:08:20 -04:00
dependabot[bot]
9029f098d0
Bump com.google.guava:guava from 32.0.1-android to 32.1.1-android (#3630)
* Bump com.google.guava:guava from 32.0.1-android to 32.1.1-android

Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.0.1-android to 32.1.1-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

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

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

* Add dependency resolution strategy per release notes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joris Pelgröm <joris.pelgrom@gmail.com>
2023-07-07 11:56:59 -04:00
Justin Bassett
7a7464c070
Bump dependency versions. (#3627) 2023-07-01 01:14:24 +00:00
Joris Pelgröm
3338437e7d
Support sensor display precision (#3625)
* Support sensor display precision

* Apply Lint suggestion in same function
2023-06-30 20:04:56 -04:00
Joris Pelgröm
48a7755e62
Add shortcut for Assist (#3615)
- Adds a shortcut to the app that allows accessing Assist from the home screen, including options for pipeline and voice/text
2023-06-29 22:19:13 -04:00
Joris Pelgröm
edf6ba5b9f
Use Assist pipeline STT/TTS on Wear OS (#3611)
* Use Assist pipeline STT/TTS on Wear OS

 - Update Assist pipeline support on Wear OS to use the pipelines' STT/TTS capabilities, if available and if the app has the required permission
 - Move UrlHandler functions (app) to UrlUtil (common)

* Create a base AssistViewModel for sharing code

 - Creates AssistViewModelBase in common to share Assist tasks that appear in both the main app and watch app

* Keep screen on during voice input to avoid interruption
2023-06-29 22:17:26 -04:00
Justin Bassett
0ef3bc4461
First attempt at a new release model. (#3597)
* First attempt at a new release model.

* Fix bad syntax

* Bump year and month with another job

* Use the plugin's version in apps.

* Make sure to generate the pre release weekly.

* Review Comments.
2023-06-26 09:05:17 -04:00
Joris Pelgröm
27d53fc672
Add intent filter for button to Wear Assist activity (#3608) 2023-06-25 22:00:22 -04:00
Joris Pelgröm
3c706bb7b1
Update Wear Assist with continued conversations, pipelines (#3604)
- Allow continuing conversation for Assist on watches by adding a mic input button at the bottom of the screen
 - Allow changing pipelines for Assist on watches when on a supported core version
 - Preparing for pipeline STT and TTS
2023-06-25 21:58:54 -04:00
dependabot[bot]
89b217ffef
Bump com.google.guava:guava from 32.0.0-android to 32.0.1-android (#3578)
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.0.0-android to 32.0.1-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava: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>
2023-06-19 14:51:31 -04:00
dependabot[bot]
30024d5255
Bump org.jetbrains.kotlin:kotlin-stdlib from 1.8.21 to 1.8.22 (#3573)
Bumps [org.jetbrains.kotlin:kotlin-stdlib](https://github.com/JetBrains/kotlin) from 1.8.21 to 1.8.22.
- [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
  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>
2023-06-19 14:51:20 -04:00
Joris Pelgröm
1cae83c40e
Implement native Assist (#3589)
* Native Assist setup + text input

* Minor (text input) UI tweaks and fixes

 - Set a very light window tint to increase contrast on white backgrounds
 - Keyboard to outline for consistency
 - Text input: keyboard action, keyboard icon to outline for consistency, show keyboard when switching
 - Fix reset conversation on recreation

* Voice input

 - Add basic voice input support to the native Assist interface

* Voice input bugfixes

 - Don't block voice output while sending data via websocket
 - Drop voice output data if there is a subscriber and the buffer is full by specifying a buffer + overflow strategy that matches behavior when there are no subscribers
 - Properly stop AudioRecord reading when job is cancelled (non-suspending function)
 - Stop recorder before stopping output collection

* Voice responses (generated TTS) playback

 - Play received tts-end events when using voice input
 - Update permission info on resume to catch granted permissions while in the background

* Pipeline switcher

 - Allow switching between all different pipelines
 - Add icon content descriptions

* Check + show attribution

* Prevent sheet that is too high pushing controls away

* UI feedback: pipelines and attribution

* Update Automotive manifest

* Fix speech bubble size for larger responses

* Update manifest to handle tasks/backstack better

 - Set the affinity to a value to make sure Assist is always launched in another task than the main app
 - Automatically remove from recents as Assist will be the only thing in it's task, after finishing there's nothing left to (re)start

* App-specific feature checks and error handling

 - Check for microphone support on device
 - Handle connectivity errors
 - Handle argument errors
 - Handle errors for pipelines that are no longer visible

* More UI feedback

 - Add a title to the sheet to make sure people know this is the Home Assistant app
 - Fix TextField alignment

* More header means max height adjustment
2023-06-19 14:50:06 -04:00
Joris Pelgröm
5d1801cb01
Set Wear theme background color to black (#3572)
* Set Wear theme background color to black

* Remove background color in individual screens
2023-06-19 14:09:44 -04:00
dependabot[bot]
0aad2cb18e
Bump com.google.guava:guava from 31.1-android to 32.0.0-android (#3559)
Bumps [com.google.guava:guava](https://github.com/google/guava) from 31.1-android to 32.0.0-android.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-02 20:45:55 -04:00
Joris Pelgröm
8dac1627f4
Update Wear Scaffold usage to be more consistent (#3562)
* Update TimeText to only show at the top of the screen

* Add Scaffold with PositionIndicator and TimeText where missing
2023-06-02 20:45:06 -04:00
Joris Pelgröm
9071302fef
Align dependency versions and bump Google dependencies (#3560)
* Align dependency versions and bump Google dependencies

* Fix overload resolution ambiguity
2023-06-02 20:40:15 -04:00
dependabot[bot]
a5cfab0c3d
Bump com.google.dagger:hilt-android from 2.45 to 2.46.1 (#3548)
Bumps [com.google.dagger:hilt-android](https://github.com/google/dagger) from 2.45 to 2.46.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.45...dagger-2.46.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-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>
2023-05-26 08:35:31 -04:00
dependabot[bot]
bfaace566a
Bump org.jetbrains.kotlinx:kotlinx-coroutines-guava from 1.6.4 to 1.7.1 (#3541)
Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-guava](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.4 to 1.7.1.
- [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.6.4...1.7.1)

---
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>
2023-05-22 11:50:03 -04:00
dependabot[bot]
d6996ce527
Bump com.google.dagger:hilt-android-compiler from 2.45 to 2.46.1 (#3539)
Bumps [com.google.dagger:hilt-android-compiler](https://github.com/google/dagger) from 2.45 to 2.46.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.45...dagger-2.46.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android-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>
2023-05-22 11:49:07 -04:00