* Add base interface for widget entities
* Helper for widget flow -> state
* Refactor ManageWidgetsView to avoid duplicate code and string types
* Switch add/deleteAll to suspend
* Change abstract functions to suspend
* Remove unused imports
- Request an update for the detected activity sensor every minute if the app is currently doing faster sensor updates, instead of every 2 minutes, to try to have an up-to-date recognition value every time the data is sent.
- Fix inconsistent update behaviour after changing the setting but before restarting when registered for the ACTION_TIME_TICK intent by always checking the setting, and not only when set to 'fast while charging'.
* Add sticky headers to manage sensors list
- The list of managers, and for some managers the list of sensors, is getting so long that sticky headers while scrolling is nice to have to quickly see where you are when doing a fast scroll
- Remove useless sorting of managers, original list is already sorted
* Include manager name in manage sensors search
- Also match sensors when using the search function in the manage sensors list when their manager's name matches the search query. This will for example allow searching for all audio sensors, or finding high accuracy mode when searching for location.
* Add stateless/fallback/default icons to sensors
- Add a new stateless icon to sensors that is used as a default/fallback within the UI
- Add icons for sensors to the main list of sensors, blue like in the frontend when enabled and disabled alpha when disabled
- Name deviceClass and unitOfMeasurement arguments where used in sensors
* Fix sensor a-z sorting
* Show entity in details screen more like frontend
- Update the design for the entity details screen to closer match what is shown in the frontend; at the top of the screen there is now a card that mimics the layout of the entity on the (default) dashboard. This includes the icon (no longer text only), name (previously completely absent from this screen) and the state. Enable/disable is now better highlighted.
- Some technical information was removed, in line with making this page less like a database dump (use dev tools if that's required).
* Show 'None selected' for empty multi-list preferences
* Add info about update frequency to BasicSensor
- Adds information about the update frequency to a BasicSensor
- Change design for sensor details to better highlight description, and add a chip that shows current sensor update frequency taking into account app settings and Android version
* Change description on Sensor Update Frequency screen
* Fix description
* Change update type for detected activity sensor
- This uses a callback on a ~2 minute interval but can be more frequent when other apps are using the API. Worker updates only re-register the callback.
* Revert "Change update type for detected activity sensor"
- It might be updated faster but doesn't actually send new values any faster
- Fixes the default domain icon on shortcut tiles not working because of a missing ".", used an extension function to prevent this problem in the future
* Fix gesture detection on WebViewActivity
- Add actual gesture detection to the webview instead of pointer detection in order to fix the search box showing up any time 3 fingers are placed on the screen
* Remove nullable min/max velocity
- These always get a value so there is no need to make them initially nullable
* Cleanup fling detection
* Reduce minimum swipe velocity requirement
* Change direction calculation to average
- Use the average velocity of all pointers to determine in which direction the user has swiped. The previous implementation used the first/last pointer's angle which isn't necessarily the same pointer.
- Fix reducing number of pointers when velocity tracker is reset due to an opposing pointer
* Change toolbar/status bar for configuration
- Change the colors used for the toolbar and status bar for configuration from the blue accent color to a white, to better match the default frontend theme
* Switch to AppCompat SearchView
* Update Wear settings' app bar, up everywhere
- Update Wear settings' top app bar in the app to also use the white style and activity theme
- Add up navigation to all screens in Wear settings
* Compose settings design consistency updates
- When there is a scrollable column, use a scrollable Box instead around that column to make sure the padding is applied to the content instead of the entire scrollable container (which always gives padding at the top/bottom of the screen, even when content is scrolled)
- Consistently use 16dp for content padding instead of a mix of 16 and 20; 16 matches the other non-Compose settings so let's use that
* Fix high accuracy mode turns off after turning on with command
* Fix new line replacement in message
* Add comment
* Revert "Fix high accuracy mode turns off after turning on with command"
This reverts commit 4c769bf1b1.
* Update Kotlin to 1.6 and Compose to 1.1
- Remove @ExperimantalComposeUiApi, @ExperimentalWearMaterialApi annotations (because the functions aren't experimental, we are just using an experimental API) and replace with an opt-in declaration at the 'lowest level' usage
- Websocket: ProducerScope is no longer experimental so the annotation can be completely removed
- Wear: the animation APIs that are used for the time text are no longer experimental so the annotation can be completely removed
* Update for Compose sensor settings merge
- Replace the NetworkType.CONNECTED constraint on the job for WebsocketManager with a check that does not take the validation status (= internet access) of the network into account. HA may be accessible without an internet connection.
* Replace PreferenceFragment sensors list with Compose
- Start of migrating the list of sensors and their individual on/off settings to Compose by moving the list over
- Aims to replicate original design of the page for now
* Rename ViewModel to match view
* Start of sensor detail screen in Compose
- Add enabled switch and description + permission handling
- Update main list to use new Compose-based fragment
- Add new fragments to factory to prevent crash on recreation
* More sensor info to show
- Add more properties and attributes for the sensor (basically anything that doesn't require a pop-up)
- Move enabled check with permissions to ViewModel because it also needs to be updated in the database
- Fix collecting sensor settings
* Add support for sensor settings toggle/text/number
- Added a framework for setting sensor settings; toggle builds on the existing on/off toggle, and added a MutableState for settings that require the app to show a dialog
- Support for changing sensor settings that must be toggled
- Support for changing sensor settings where text or number input is required
* Finish sensor details by adding list-based settings
- Add support for setting list-based settings
- Dynamic maximum height for dialog in order to fill most of the screen
- Remove old fragment and XML since all functionality should now be covered
- Show translated setting for list settings
- Fix update of list setting removing the list options in the future, because they were stored in the DB entry but a new entry without any values was created
- Fix toggle sensor setting (removed the space)
* Tweak single rows with switch and height
- Don't use two line row height if there is no summary
- Remove onCheckedChange from Switch so that it is handled by the row
- Prevent text from getting too close to switch
* UI fixes and tweaks
- Fix search query still being set when returning to the main sensors list after viewing a sensor's details by clearing the query in the view model if the SearchView is closed
- Move sorting the sensors for each manager to the UI where the sensors are queried, instead of in an internal variable
- Set secondary color to allow Switches, RadioButtons and Checkboxes to use the blue HA tint without overriding each one manually
- Add stable IDs to main sensor list to improve recomposition for search
* Allow selecting some rows in details
* Move dialog popup into a separate file
- Move the dialog that is used to a separate file because it was already based on a custom dialog for the Manage Widgets screen.
- Improve max height for dialog by using weight, to make sure it still works correctly for longer titles
- When using radio button items, don't require the user to press save but instead save it when an item is selected
* Show disabled state for sensor setting rows
* Update unchecked switch thumb colors
- Google says using the same color as the surface with a minimal shaodw is by design, https://issuetracker.google.com/issues/185418990, but it just results in bad contrast (probably why they switched to a different switch design in Android 12), so manually copied the color code to use
* Also use disabled state for sensor setting row summary
* Fix comment
* Compress bitmaps to avoid remoteview memory utilization error.
* Cleanup
* Add log helpful for debugging
* Make formatting more consistent with standard notification view
* Switch to only using time based method
* Remove random image
* Fix lint
* Update order of imports
* Download mp4 and parse out frames using MediaMetaDataRetriever
* Add view and remote views implementation
* Smoothen out frame selection
* Add constants
* Support all frame rates of video and set frames to show over 2 seconds
* Add option for faster sensor updates, and also while charging
* Move settings to its own view, change logic to store in DB
* Set default value
* Try another way
* Try new default method
* Use correct default
* Clean up
* Review comments
* Remove dependency on is_charging sensor
* Switch to a better condition check per review
* Fix db