Commit graph

1029 commits

Author SHA1 Message Date
dependabot[bot] 1449ff5409
Bump sentry-android from 6.4.1 to 6.4.2 (#2898)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 6.4.1 to 6.4.2.
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-java/compare/6.4.1...6.4.2)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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>
2022-09-24 20:19:34 +00:00
Joris Pelgröm 0222d6b673
Bump Google dependencies (#2910) 2022-09-24 16:04:58 -04:00
Daniel Shokouhi 603e411823
Breaking Change: Add major and minor to UUID for beacon attribute in beacon monitor (#2909)
* Add major and minor to UUID for beacon attribute

* Review comments
2022-09-24 16:04:31 -04:00
Daniel Shokouhi 7c6096634f
Allow custom intents register for categories in case they are required (#2901)
* Allow custom intents register for categories in case they are required

* Update description

* Update string to be more generalized and readable
2022-09-24 16:03:32 -04:00
Daniel Shokouhi 91a4b02500
Change TTS error message and clean up some other strings (#2890) 2022-09-24 16:01:20 -04:00
Daniel Shokouhi 2e19dc4474
Add support for intent scheme URI and deep links in clickAction and actionable notifications (#2888)
* Add support for intent scheme URI in clickAction and actionable notifications

* Add a new prefix for app links in actions

* Rename app link to deep link to be more precise

* Use correct intent prefix

* Take user to the play store if the app is not installed

* Fix taking user to the market if app is missing, remove ability for deep links since we can't get the package name

* Only open the play store if we have an actual package to open to
2022-09-24 16:00:29 -04:00
Daniel Shokouhi 763819746a
Add a dynamic color sensor for accent color (#2884)
* Add a dynamic color sensor for accent color

* Update colors to color to match material design label
2022-09-24 15:56:10 -04:00
Joris Pelgröm 80816df6f5
Add support for using BSSIDs for internal connection (#2883)
* Add support for using BSSIDs for internal connection

 - Add support for entering BSSIDs to use for detecting when the internal connection URL should be used. These are saved like any regular SSID, but contain the prefix "BSSID:".

* Add link to documentation
2022-09-24 15:55:36 -04:00
Daniel Shokouhi 9fa983c6dc
Fix full screen mode for all devices (#2878)
* Fix full screen mode for all devices

* Hide system UI when we regain focus and a video is still full screen

* Revert theme changes

* Remove unneeded line break
2022-09-24 15:54:38 -04:00
Daniel Shokouhi d87781dea4
Breaking Change: Only send notification received event if a notification wants the confirmation (#2899)
* Breaking Change: Only send notification received event if a notification wants the confirmation

* Update change log
2022-09-20 19:48:51 +00:00
Daniel Shokouhi a34487409c
Update change log week of 9/2 (#2842)
* Update change log week of 9/2

* Reduce description as docs also mention the rate limit

* Add more changes from recent merges
2022-09-10 12:33:52 -07:00
Daniel Shokouhi 0ce8cbe871
Add item ID to active notification attributes to keep them unique (#2856) 2022-09-10 15:22:11 -04:00
Joris Pelgröm 6a0ffd82b1
Tweak camera control active state: true if not unavailable (#2871)
- Set the thumbnail template for the camera control to active as long as the camera isn't unavailable and the app was able to download an image, to show the camera image more often and better match the frontend.
2022-09-10 15:18:45 -04:00
Joris Pelgröm 6756e21112
Fix template widgets that render null in websocket subscription (#2866)
Fix widgets that return null in websocket subscription

 - Just like in the preview, null is a valid result and should be handled by the app
2022-09-10 15:18:10 -04:00
Joris Pelgröm a31afb3455
Only subscribe to state changes for added controls (#2864)
- Instead of receiving all state changes when the device controls are open, only receive state changes for entities that were added as controls. This potentially reduces the amount of data used while controls are open.
2022-09-10 15:17:49 -04:00
Joris Pelgröm bdc9094845
Improve adding quick settings tile (#2860)
* Improve adding quick settings tiles

 - Use the new option available on Android 13 to prompt the user to add a tile to the quick settings panel, if a tile wasn't already added
 - Switch Toast to Snackbar
 - Move some logic from the manage tiles view to viewmodel

* Only show subtitle field when supported

 - Setting a tile subtitle is only supported on Android Q+, so don't show the field on versions before that!

* Deeplink into app for tiles that aren't setup

 - Instead of disabling a tile if it isn't setup, if the user is logged in set it up as inactive with the default icon/label and deeplink into the app settings with a notice that it needs to be setup first. This provides a better first use experience, as the user can simply tap it to setup instead of requiring them to manually go to the settings.
2022-09-10 15:16:36 -04:00
dependabot[bot] 2380741a45
Bump jackson-module-kotlin from 2.13.3 to 2.13.4 (#2851)
Bumps [jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) from 2.13.3 to 2.13.4.
- [Release notes](https://github.com/FasterXML/jackson-module-kotlin/releases)
- [Commits](https://github.com/FasterXML/jackson-module-kotlin/compare/jackson-module-kotlin-2.13.3...jackson-module-kotlin-2.13.4)

---
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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-05 14:42:26 +00:00
Joris Pelgröm a711c659a4
Update Wear onboarding to always use phone for sign in (#2838)
* Always do Wear onboarding on phone

 - Switch the Wear onboarding to always use the sign in flow on the paired phone, instead of offering the option to sign in completely on the watch.
 - When opening the companion app using the Wear app, immediately link the user to the list of instances or sign in screen.
 - Use standard OAuth flow for devices without companion app installed.
 - Fix type casting of location preference in Wear onboarding result.

* Fix ListenableFuture await import
2022-09-05 10:25:13 -04:00
Daniel Shokouhi dab3640c6b
Fix sensorDao not initialized error after geocoded update (#2772)
* Fix sensorDao not initialized error after geocoded update

* Switch to sending an intent to update the sensor

* Review comments
2022-09-05 10:11:38 -04:00
Adrian Huber d0016e530e
Add Beacon Monitor (#2472)
* Add BLE Beacon Monitoring Sensor

* Fix on/off toggle

* Add on/off commands

* Fix commands

* Add all beacons to attributtes

* Add Kalman Filter

* Improve performance

* More settings

* cleanup

* Fix linter errors

* Update description

* Show monitoring state in sensor

* Add missing permissions

* Fix permissions

* Fix Bluetooth state of Android 12

* Use instance instead of singelton

* Use runBlocking for updateLastSendState

* Use own scope for beacon manager

* Use new notification commands

* fix rebase

* use null instead of empty string

* return if sensor is disabled
2022-09-05 10:07:26 -04:00
dependabot[bot] 647d6c4533
Bump sentry-android from 6.4.0 to 6.4.1 (#2836)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 6.4.0 to 6.4.1.
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-java/compare/6.4.0...6.4.1)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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>
2022-09-05 10:05:33 -04:00
Joris Pelgröm e31ec2f731
Send external url to Wear discovery (#2839) 2022-09-05 10:05:04 -04:00
leroyboerefijn 3926a04e21
Update companion settings landing page for Wear settings (#2837)
* Update companion settings landing page for Wear settings

* Fix description

* Update text and label
2022-09-05 10:04:26 -04:00
Joris Pelgröm 567e286bfa
Fix media notification command (#2835)
Fix media command

 - Fixes the media command code using 'command' to check if it is included but 'media_command' to do the actual command
2022-09-05 10:00:08 -04:00
Joris Pelgröm c6b36d82bb
Support device controls on locked Android 13 device (#2820)
- Add support for using device controls while the device is locked on Android 13 devices
 - Start compiling with Android 13's SDK to make this possible
2022-09-05 09:58:13 -04:00
Joris Pelgröm 232fbb2b2d
Better state change subscriptions in entity state and media player widgets (#2814)
Implement subscribe_trigger and use it in widgets

 - Implement support for subscribing using subscribe_trigger, currently used to get state changes only for specific entities
 - Change the entity state and media player widgets to use this new subscription instead of subscribing to all state changes, based on the template widget
 - Removed some placeholder code from media player widget
2022-09-05 09:56:44 -04:00
RoboMagus 2cf5a7d215
Option to bypass app lock on home network (#2800)
* Add setting to bypass app lock on home network

* Debug loging to check logic

* Fix logic. Cleanup logging.

* Disable home lock bypass when no home networks are configured.

* Only check for WiFi SSID, not internal URL when evaluating isLockEnabled.

* Fix build error
2022-09-05 09:53:07 -04:00
andyboeh 6b06e0d8a8
Add authentication to widget buttons (#2798) 2022-09-05 09:50:53 -04:00
Daniel Shokouhi 6e647cb436
Only add next subscription if control is not null (#2812)
* Only add next subscription if control is not null

* Add one more null check for control
2022-08-29 20:50:09 -04:00
Aaron Wood cfafffd27f
Remove toast when failing to send notification clear event (#2576) 2022-08-29 20:31:49 -04:00
Joris Pelgröm e30390533d
Don't notify about cancellations in WebsocketManager (#2831)
Don't notify about cancellations in WebSocketManager
2022-08-29 20:27:46 -04:00
Joris Pelgröm af0371fb7b
Fix adding media player widget from settings (#2813)
- Adding a media player widget from settings didn't work because the list used to check that entities have been selected isn't updated immediately, but only on load or in a callback after pinning the widget. To work around this, manually check it before pinning the widget.
2022-08-29 20:26:39 -04:00
Daniel Shokouhi db8913c712
Breaking Change: Add some more attributes to geocoded sensor and check that device supports it (#2809)
* Add some more attributes to geocoded sensor and check that device supports it

* Remove language attribute as it does not supply the expected data

* Combine latitude and longitude into the location attribute again
2022-08-29 20:25:48 -04:00
Joris Pelgröm a995d9410b
Support multiple subscriptions of same type in websocket and use in template widget (#2801)
* Update WebSocketRepository for multiple subscriptions of same type

 - Change the structure of how the websocket repository tracks individual subscriptions to allow subscribing multiple times with the same type, but different data

* Update TemplateWidget to use template subscriptions

 - Instead of depending on entity state changes and refreshing any time there is a change, use the render_template subscription for the template widget to limit the amount of data and power used. To make this possible without too much abstractions, the TemplateWidget no longer implements BaseWidgetProvider.
 - Fix hardcoded "Loading" string

* Handle potential null subscription ID

 - Implements #2795 for changes to tracked subscription ID

* Handle failed subscribing similar to other failures (null)

 - When subscribing fails, return null and don't store an active subscription instead of continuing and returning a flow (which would never emit messages)

* Update manifest
2022-08-29 20:23:48 -04:00
Daniel Shokouhi ebc6b76dda
Update changelog week of 8/19 (#2808)
* Update changelog week of 8/19

* Mention battery power sensor
2022-08-20 08:52:49 -07:00
dependabot[bot] 358854b894
Bump sentry-android from 6.3.1 to 6.4.0 (#2806)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 6.3.1 to 6.4.0.
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-java/compare/6.3.1...6.4.0)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-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>
2022-08-19 20:35:11 -04:00
Daniel Shokouhi efdd5272e0
Add exclude recents flag to avoid showing multiple open activities in recents (#2805)
Add exclude recents flag to avoid showing multiple open activities
2022-08-19 20:34:57 -04:00
Daniel Shokouhi da8263dc9c
Only update geocode sensor if accuracy and time are valid, like location updates (#2802) 2022-08-19 20:34:33 -04:00
Daniel Shokouhi ae0f788bb4
Expand the error so its more meaningful (#2794) 2022-08-19 20:30:55 -04:00
dependabot[bot] e7dcdacda0
Bump accompanist-appcompat-theme from 0.25.0 to 0.25.1 (#2787)
Bumps [accompanist-appcompat-theme](https://github.com/google/accompanist) from 0.25.0 to 0.25.1.
- [Release notes](https://github.com/google/accompanist/releases)
- [Commits](https://github.com/google/accompanist/compare/v0.25.0...v0.25.1)

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

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>
2022-08-13 20:58:03 -04:00
Daniel Shokouhi 7f5ec402db
Bump some more app dependencies (#2792) 2022-08-13 20:52:34 -04:00
Joris Pelgröm 550c18c6e2
Handle foreground service restrictions for persistent connection (#2790)
* Handle foreground service restrictions for persistent connection

 - When trying to start the WebsocketManager as a foreground service, catch exceptions due to restrictions and show the user a notification to fix it

* Update logging in WebsocketManager
2022-08-13 20:49:55 -04:00
Joris Pelgröm 5e11df521c
Fix opening my.home-assistant.io links (#2780) 2022-08-13 20:38:07 -04:00
Joris Pelgröm 3436f2169d
Use OkHttpClient to download notification videos (#2779)
- Change to the OkHttpClient used elsewhere by the app to download notification videos to resolve problems related to cookies and mTLS authentication. As a result, storing and deleting the file is now handled by the app instead of by the system.
2022-08-13 20:37:26 -04:00
Daniel Shokouhi d3c22cf341
Fix unable to Toast on QS tiles being clicked error (#2776)
* Fix unable to Toast on QS tiles being clicked error

* Review comments
2022-08-13 20:36:32 -04:00
Daniel Shokouhi 03a356f147
Only change channel if variable actually provided (#2773) 2022-08-13 20:33:22 -04:00
Rogue136198 0c9e8ac65f
Improve Notification GIFs (#2657)
* Modify Notification GIF Framerate

Modoify VIDEO_INCREMENT_MICROSECONDS to have notification GIFs generate a frame every 0.5 seconds for a video instead of the current every 2 seconds. This should result in smoother notification animations thus improving the UX

* Increase processingFrames.size

Increase processingFrames.size as increasing the framerate results in the animation ending too soon

* Scale video to a max width of 480 while maintaining video ratio

Notification video width scaled to 480. (1920 / 4) Height will scale accordingly while maintaining video aspect ratio. e.g. 1920x2560 will be scaled to 480x640

Frames are set to every 1 seconds with 5 frames resulting in a 5 second GIF

* Update MessagingManager.kt

Based on research and rapid prototyping under another fork, I've decided that scaling the image to a fixed width and a ratioed height is not going to work. There are issues that need to be resolved which result in the image being cut off and stretched in the notification. 

End result is the only overall change is changing the frame generation from once every 2 seconds to once every 1 second. This has improved the fluidity of notifications but I understand is my own subjective opinion.

This means there is still a potential case where 4K cameras will exceed the size limits of notifications.

* Typo fix

* Re-Implement Scaling to a Constant Width

* Update MessagingManager.kt

* Add logic to not scale videos smaller than specified width and Increase GIF speed (ViewFlipper)

* Tune processing times

Tune processing time to have one frame generated every 0.75s, then frames are played back at 3x speed. This results in 9 seconds of activity being played in 3 seconds.

* Implement Dynamic Frame Count

Dynamic number of frames up to a specified size limit (currently 2.5MB)

* Review Before Merge
2022-08-13 20:33:00 -04:00
Joris Pelgröm 22df320fd9
Use OkHttpClient to download notification images (#2768)
- Change to the OkHttpClient used elsewhere by the app to download notification images to resolve problems related to cookies and mTLS authentication
2022-08-06 13:03:38 -04:00
Joris Pelgröm 5d5e31e1cf
Update Wear OS companion app packages (#2766) 2022-08-06 13:02:26 -04:00
Daniel Shokouhi cc68946026
Add fragment dependency to resolve settings view model crashes (#2764) 2022-08-05 01:25:19 +00:00