* Expose wantAck in Mesh Packet
* Update DataPacket.kt
* Update DataPacket.kt
* Update DataPacket.kt
* Update DataPacket.kt
* Refactor: Change wantAck field type in DataPacket
- Changed the `wantAck` field in `DataPacket` from `Int` to `Boolean`.
- Updated read/write and equals/hashcode functions accordingly.
* Update MeshService.kt
* Update MeshService.kt
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
* Update MeshService.kt to store the channel for received packets.
The channel for received packets is now stored, allowing for better tracking and management.
* Update node info creation to include channel data
- Updates `getOrCreateNodeInfo` to accept a channel parameter and to save the channel to the node info during instantiation of a new/unknown node.
- Updates `updateNodeInfo` to accept a channel parameter and pass it to the updated function.
- Updates call to `updateNodeInfo` in `handleReceivedData` to pass the packet channel data to it.
* feat: Improve notification behavior
- Changes low battery notifications to be non-cancelable
- Cancel low battery notifications when battery level is no longer low.
- Add notification groups and improve notification settings.
- Add vibration to low battery notifications.
* Improve low battery notification
Add battery level progress bar to the low battery notification.
* Add initial implementation of low battery notifications for locally-connected and favorite nodes
* Hopefully make detekt happy
* detekt pls.
* Deduplicate some of the code
* detekt'd
* feat: Show alert notifications and override silent mode
This commit adds support for showing alert notifications with high priority and the ability to override silent mode to ensure they are delivered to the user.
The changes include:
- Adding `showAlertNotification` function which overrides silent mode and configures a custom volume, shows a notification with high priority.
- Creating a new notification channel for alerts.
- Adding the alert app port number to the list of remembered data types.
- Modifying `rememberDataPacket` to check for alert app messages and show alert notification.
* Add notification policy access permission and DND override for alerts
This commit adds the `ACCESS_NOTIFICATION_POLICY` permission to the manifest and requests this permission from the user. It also adds a check for notification policy access in the MainActivity, and if it's not granted, shows a rationale dialog.
Additionally, the commit adds a notification override to the `showAlertNotification` function in `MeshServiceNotifications` to temporarily disable DND for alert notifications and restore the original ringer settings afterwards.
* Refactor: Enhance Android Notification and DND Handling
- **Notification Channel Improvements:**
- Added `notificationLightColor` for better customization.
- Set `enableLights` and `enableVibration` in the alert channel.
- Use `alert.mp3` sound for alert channel.
- **DND Permission Request:**
- Introduced a new permission request flow for Do Not Disturb (DND) access.
- Show a rationale dialog before requesting permission.
- Persist if rationale was shown to avoid re-prompting.
- Added a `notificationPolicyAccessLauncher` to handle the permission request result.
- **Critical Alert Text**
- Added critical alert text in strings.
- Used critical alert text if the alert message is empty.
- **Other Changes**
- Removed unused imports and constants.
- Updated snackbar to support action.
* Refactor alert notification logic
- Change `notificationLightColor` to be lazy initialized.
- Update alert notification to use `CATEGORY_ALARM`.
- Use `dataPacket.alert` instead of `dataPacket.text` for alert content.
- Add `alert` property to `DataPacket` to handle alert messages.
* Set notification light color back to blue.
* Request notification permissions on grant
The app now checks for notification policy access after notification permissions are granted.
* make detekt happy
* updates dnd dialog text
* Refactor notification channel creation and critical alerts
- Initialize notification channels on service creation.
- Remove `ACCESS_NOTIFICATION_POLICY` permission.
- Modify the logic for requesting "Do Not Disturb" override permission to align with channel settings.
- Add new string resources for Alerts Channel Settings.
- Update wording for critical alert DND override.
- Update DND override request flow.
- Create notification channels on the service creation using `initChannels`.
- Adjust logic to check for "Do Not Disturb" override permission to align with notification channel settings.
- Ensure notification channels are created only if they do not already exist.
* refactor: Update DnD dialog with instructions for Samsung
- Renamed "Alerts Channel Settings" to "Channel Settings".
- Added Samsung-specific instructions and a link to Samsung's support page for Do Not Disturb mode in the alerts dialog.
- Updated the dialog to display Samsung-specific instructions when on a Samsung device.
* Refactor critical alerts instructions
- Updated the critical alerts instructions to include a link to Samsung's support page directly within the alert dialog.
- Removed the separate "Samsung Instructions" string and incorporated the information into the main instruction text, improving clarity and reducing redundancy.
- Made improvements to the UI.
* Remove unused SoftwareUpdateService code and commented out service reg in manifest
* Remove unused methods that had unnecessary version checks
* Regenerate baseline to remove detekt issues that are no longer present
* Implement initial support for adding and removing nodes from favorites
* Make favorite nodes' names show up bold in the node list
* Forgot to add this here when I was fixing the previous merge conflicts. Whoops!
* Make detekt happy
---------
Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
* feat(config): implement excluded modules validation
* feat: hide excluded configs from metadata
* refactor: save local metadata from WantConfig
* refactor: delete metadata from deleted nodes
* fix: always request metadata for admin routes
* feat: show node firmware when metadata is available
* refactor: rename filter function
* feat: add `ServiceAction` request metadata
* Trap code 147 on BT disconnect
If we trap code 147 on BT disconnect and then call lostConnection(), the app will attempt reconnect every 30 seconds and autoreconnect works even after prolonged disconnect.
* Add tapback emojis to message bubbles
Added TapBackEmojiItem composable to display tapback emojis.
Included it in MessageItem composable for incoming messages.
Added a FlowRow to show tapback emojis below the message bubble.
* feat: Add EmojiPicker View
* feat: show emojis for local messages
* feat: Add emoji tapbacks to messages
This commit introduces the ability to send and receive emoji tapbacks for messages.
- Adds emoji and replyId fields to DataPacket.
- Adds emoji tapback support to the MeshService
- Modifies UIState to handle emojis in message lists.
* feat: store tapbacks in database
Store tapbacks in the database and display them in the message list.
- Add a new table to the database to store tapbacks.
- Add a new DAO method to insert and retrieve tapbacks.
- Update the message list UI to display tapbacks.
* refactor: relation db and other changes
---------
Co-authored-by: Andre K <andrekir@pm.me>