* Add signal strength and data network type sensors
* Split signal strength and data network type sensors by SIM
---------
Co-authored-by: Joris Pelgröm <joris.pelgrom@gmail.com>
- If Assist is opened (via the default assistant app shortcut), but the app is not yet registered, send the user to onboarding to skip having to close + open app manually. This matches the app's Wear OS behavior.
* Add foreground service types for Android 14 target
- Adds information about the foreground service type as this is required when targeting Android 14 and will otherwise throw exceptions: https://developer.android.com/about/versions/14/changes/fgs-types-required
* Update automotive full manifest
* Remove heart rate sensor for Wear OS 4+
* Rework: request background permission separately
- Requesting the background permission separately seems to work and allows the user to keep using this sensor after changing the target SDK version
fixed TTS queuing mechanism and volume override resets
A new TextToSpeechEngine abstraction has been introduced, along with a default Android TTS implementation and a TextToSpeechClient as the entry point. The client now features an independent queue, allowing for better control over the start and finish of each utterance and separating it from the engine, which focuses solely on playback. This resolves issues with interrupting utterances and volume overrides not resetting correctly when utterances are queued or force-stopped.
- For received Assist pipeline text messages from the server, trim what is displayed in the app to avoid messages with additional empty lines as seen in the latest HA core beta
* Use device class enum where possible and supply possible states for those sensors
* Add some missing sensors
* Review comments and suppress lint
* Add media session sensor to enum device class
* Add some missing states for audio sensor
* Correct improper SDK check for mic muted intent action
* Update wear intent receivers
* Correct mic muted sensor update type
* Bump org.jlleitschuh.gradle.ktlint from 11.6.1 to 12.1.0
Bumps org.jlleitschuh.gradle.ktlint from 11.6.1 to 12.1.0.
---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle.ktlint
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* Add .editorconfig
* ktlintFormat
* Fix comment in a 'value_argument_list' is only allowed when placed on a separate line
* Restore AssistShortcutView
* Fix comment in a 'value_argument_list' is only allowed when placed on a separate line
* Fix no comment expected at this location
* Fix property name should start with a lowercase letter and use camel case
* Fix parameter comments
* Fix comment in a 'value_argument_list' is only allowed when placed on a separate line, again
* Fix property name should use the screaming snake case notation when the value can not be changed
* Fix final comment in argument list
---------
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>
* Add option to update camera & template tile 'on view'
- Use the tile enter callback to request an update to the tile once it enters the view. Considering that this callback exists it's probably safe to assume an update that is requested in this callback won't be throttled (at least it appears to work during testing).
- Minor edit to the refresh interval picker to ensure strings that are more than one line look a bit nicer.
* on view -> in view
* Make volume sensors update instantly by subscribing to a broadcast
* Change skippableActions to a 1-to-many map and the list of all volume sensors to the corresponding Intent action key
- Update Assist on Wear to automatically open the login screen when logged out, instead of asking the user to close and login, to prevent text being cut off issues
- Add another item at the top of Assist on Wear to allow the pipeline selector to be scrolled into the center of the screen (the first item cannot be scrolled into the center of the screen)
- To (hopefully) finally address review failures about text being cut off on round screens replace it with an icon. Same icon as used in the previous screen so should be pretty clear.
* Support multiple Template tiles on Wear OS
* Add `TemplateTileConfig` data class
* Fix migration
* `Pair` -> `TemplateTileConfig` fixes
* Fix `getAllTemplateTiles` implementation
* Initial work on companion <-> wearable device communication
* More work on phone <-> wear device communication
* Save updated template in phone app
* Get the template to render using the right method
* Fix CI complaints
* Work on Wear UI for multiple template tiles
* Update wear manifest
* Wear migration and navigation fixes
* Fix Template tile IDs in mobile app
* Make adding a new Template tile on Wear device work
* Small cleanups and TODO fixes
* Try to fix template config refresh in settings
* Fix after rebase
* Adopt blocking approach for reacting to tile events, inspired by #3974
* Use `OpenTileSettingsActivity` for template tile
* Adopt Material 3 and other UI-related changes
* Show help text in phone app if no template tiles have been added yet
* Reference the view model variable inside the function
By having the view model variable outside the block, the updated template tile
might not be propagated to the template settings view.
* Reload template tiles when opening the template tiles from settings
* Replace null key with -1 for old template tile
* Lint complaints fixes
* remove TODO
* Store error
* Scrollable list of template tiles
* Move "Configure template tile" to header
* Replace with methods with copy
* Show template as secondary text
* Fix scrolling
* Update app/src/full/java/io/homeassistant/companion/android/settings/wear/views/SettingsWearTemplateTileList.kt
Co-authored-by: Joris Pelgröm <jpelgrom@users.noreply.github.com>
* Remove unused field
* Move padding to "no tiles" text
* Add deep link
---------
Co-authored-by: Joris Pelgröm <jpelgrom@users.noreply.github.com>
* Add Wear OS TLS client certificate authentication (TLS CCA) support
Wear OS does not currently allow the user to install certificates to the
system-wide KeyChain for TLS CCA support. This commit adds support for
using certificates from the app-specific Android KeyStore with UI for
setting up a certificate during the Wear OS onboarding process.
The manual step in the onboarding process is required since we cannot
transmit certificates of the Android KeyChain because they are not
extractable.
In particular, this commit adds the following changes:
* KeyStoreImpl as an additional KeyChainRepository interface
implementation for loading and storing keys to the application's
KeyStore. TLSHelper uses KeyStoreImpl as a fallback key manager.
* UI for selecting a certificate file with GET_CONTENT intent during
Wear OS onboarding in OnboardingActivity if it is detected that the
Home Assistant may require TLS CCA. The UI includes a password check
for the PKCS12 container.
* During onboarding the app sends the raw PKCS12 data to Wear OS
together with the container password. The connection is assumed to be
encrypted and trusted so that no additional encryption is necessary.
* Move PKCS12 password check to lifecycle scope
* Remove redundant try-catch when loading PKCS12
* Simplify MobileAppIntegrationView layout code
* mobile_app_notification_cleared for wearos
* Fix imports
* Remove database id extra
* Fix whitespace
* Reformatted imports and added the receiver to the manifest
* Move `handleDeleteIntent` to common
Update tiles logged out state to prevent cut off overflow
- Limit length of logged out state string to prevent text cut off and shorten strings to help with translations
- Fix inconsistent shortcuts tile name
- Updates the shortcut tile's handling of add/remove event + destroying the service, just like the camera tile, to prevent the service scope being cancelled while the app is still storing tile added/removed
- (this service already didn't overwrite existing tile data when onTileAddEvent was called again)
* Update launcher icon, Play Store feature graphic
- Update launcher icon to better match other Android app launcher icon sizes
- Update Play Store feature graphic to new version
* Cannot deduplicate this launcher icon on Wear
* ktlint
- If there is already a camera tile with the ID of the tile in `onTileAddEvent` stored in the database, don't overwrite it with a new blank tile as the user configuration might be lost.
- Run add/remove event code blocking to prevent the system immediately destroying the service and as a result cancelling the work to save tile data in the database. Without the blocking code I could semi-reliably get it to destroy the service within several milliseconds of adding/removing, often preventing the database code from running.
* Update complication config screen to m3 components
* Clean up some code so its resuable
* Review comments and bump library
* Migrate more screens
* Review comments
* Tweak some colors
* Use consistent button container color
* Remove unnecessary font color
* Tweak Button disabled color to match ToggleButton
* Update a couple more chips and a preview
* Use in app color default
* Update manual onboarding screen to prevent the button from overlapping elements
* Limit to 2 lines of text
* Switch to ScrollView
* Add padding for round devices
* Review comments
* First commit of migrating Wear OS components to Material 3
* Tweak more colors, fix some variables, use switches and bold more text
* More clean up
* Fix color in default chip
* Clean up unused code
* Add first draft for NFC sensor
* Rename NfcSensorManager.nfcSensor to nfcStateSensor
* Move NfcSensorManager to the common module
* Add BroadcastReceiver subscription to NfcAdapter.ACTION_ADAPTER_STATE_CHANGED in both the app and wear modules
* Remove TODO comments
* Change updateType to INTENT
* Convert simple methods to expression body
* Change mdi:nfc to mdi:nfc-variant
* Fix docs URL
* Reword NFC sensor manager according to the PR suggestions
* Use recommended splash screen library for Wear OS
* More tweaks per recommendations
* Add splash screen to Assist
* Add splash screen for Assist
* Use mipmap instead of drawable
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
* 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
- 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.