- 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.
* 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
* Actually update geocoded sensor on location updates we send to HA
* Ensure sensor is updated before checking if we should send the update
* Move update logic to sensor receiver, ensure last sent attributes are updated
* Restart location updates if we detect too much time passed since last update
* Switch to last location received for proper evaluation
* Code review: move variable logic to be inside the condition
* Fix websocket stays subscribed after widget edit due to multiple instances
- When a widget is edited, the system will send a broadcast to _a new instance_ of the widget class. Because there is a websocket connection to keep widgets updated, the new instance of the class should also receive events to unsubscribe.
* Use companion object to prevent unnecessary updates
- Only actually start listening for updates in one of the instances in order to prevent unnecessary duplicate widget updates
* Actually check the paired state instead of assuming it
* Ensure the attributes have no duplicates by making the lists distinct
* Actually check for duplicate devices to remove them
* Apply code suggestion
* Revert some changes and remove allowDuplicates per comment
* Add support for lock domain in QS tiles, change tile not setup message to be more precise
* Update dispatcher
* Review comments: Remove not setup from string, only get state if domain is lock when tile is clicked
* Remove duplicate strings
* Remove error message on null template
- Null is a valid value for a template so the app should reflect that instead of suggesting there is an error, which may cause users to start looking in the wrong place.
* Log.e instead of Log.i
* Add logging in authentication fragment to print errors
* Expand error messages to contain more useful data
* Add error content to pop-up to provide more data to the user
* Show more descriptive onReceivedError message
* Ensure the correct messages are used
* Add changes from @jpelgrom to only show the error on the expected URL
* Add condition to onReceivedErrror as well
Automatically delete stale widgets from database
- Automatically removes widgets that are no longer bound to the widget provider but that are still in the database -> 'stale'/old widgets will no longer cause unnecessary updates
- Removes the external storage permission for logs for devices on Android 6+, because the external cache dir is usable without this permission and it will no longer work when targeting Android 13 on Android 13 devices. It should work on Android 4.4 and above but this bug suggests it might not on Android 5, but it is auto-granted and needed for downloads anyway: https://issuetracker.google.com/issues/37013142.
- Set the maximum version for the external storage permission to Android 9; starting with Android 10 the download manager will use MediaStore.Downloads which doesn't require any additional permissions.
* Implement styling on the template tyle
* Also process preview in phone settings
* Small cleanup
* Improve template null handling
* Update template rendering error
* Update help text to indicate new line and markup options
* Also support newline
* More extensive replacement for <br>
* Add camera device control
- Adds a camera device control on supported devices (12+)
- Update content description for camera widget
* Improve Icon if downloading thumbnail fails
- Show a blank grey thumbnail like an empty tile if downloading the camera thumbnail fails, because the system will stretch the provided image so a 'proper' icon can end up looking weird
* Improve error handling
* Migrate SSID dialog to Compose, move + rename prioritize internal
- Replaces the SSID dialog with a new screen built with Compose (same functionality as before)
- Move the prioritize internal setting to the new SSID screen where it makes more sense, and rename it + style it as a dropdown to prevent unnecessary changes
* Remove unused Spacer
* Fix button widget field data overwrite on text change
- The text changed listener might be called while the button widget fields were being setup if a value exists. If other fields are bound at the same time this might overwrite their values and cause problems, so make sure to use the adapter position for the viewholder instead.
- If setting a value fails set the text input to empty instead of showing the previous value
* Fix incorrect input in button widget fields
- Properly set the hint for the button widget fields to null if no hint is available to prevent an old hint from being visible
- Properly set the autocomplete functionality to null if no autocomplete functionality is expected to prevent unwanted autocompletion
* Fix services list if service was previously selected
- Always load the full services list, even if a service was previously selected, and apply a filter on the list after setting it to prevent the dropdown from showing incorrect values
- Add specific error if the app encounters a HTTP 404 response during onboarding registration, because that means the mobile_app integration is missing
- After an error, clean up the session data to make sure a new registration attempt is made