Commit graph

28 commits

Author SHA1 Message Date
James Rich
38b949f9c1
fix: Propagate reply ID for DataPackets (#2177) 2025-06-19 18:20:07 -05:00
James Rich
357efa9028
feat: Implement message reply functionality (#2147) 2025-06-17 20:15:07 -05:00
Łukasz Kosson
9a371ee9cd
feat: show per-message SNR, RSSI and hop count (#2040)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2025-06-06 15:41:25 -05:00
niccellular
3bc4454c0e
Expose wantAck in Mesh Packet (#1703)
* 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>
2025-03-21 20:51:52 -05:00
James Rich
d78bea2365
feat: Show ALERT_APP notifications and override DND (#1515)
* 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.
2025-03-05 07:28:52 -06:00
andrekir
13b615a470 chore: update license header 2025-01-02 07:00:51 -03:00
andrekir
4a1319a645 refactor: replace user with node in Message model 2024-12-05 19:50:15 -03:00
andrekir
1219d3037e chore: add GPL-3.0 license headers to source files 2024-11-26 08:54:18 -03:00
andrekir
fe56d257f5 chore: add detekt formatting rule set
https://detekt.dev/docs/next/rules/formatting/
2024-10-14 07:56:29 -03:00
andrekir
2433cbc00a feat: show names with a lock for DMs using PKC 2024-09-16 10:30:15 -03:00
andrekir
2dd0e1f1e2 refactor: reduce coupling in Parcelables 2023-10-03 17:27:16 -03:00
Andre K
271124dc9c
refactor: implement CompatExtensions (#641)
updates deprecated methods, classes, and flags introduced in Android SDK 33, while ensuring compatibility with previous Android versions
2023-05-30 18:30:46 -03:00
andrekir
62420132f1 feat: waypoints 2023-02-01 12:49:30 -03:00
andrekir
5c3595931f use encodeToByteArray / decodeToString methods 2022-12-10 00:45:50 -03:00
andrekir
65e982ddd5 refactor messages to Room database 2022-09-15 22:24:04 -03:00
andrekir
9c6a42e5c2 add waypoint payload parser 2022-09-09 22:15:27 -03:00
andrekir
e90b856524 move DELAYED_BROADCAST logic to service 2022-09-03 07:38:36 -03:00
andrekir
ba2a6e0573 add contacts 2022-04-03 11:25:50 -03:00
Kevin Hester
82ebfd0094
Merge branch 'master' into master 2021-04-15 12:04:37 +08:00
Vadim Furman
bd74d64be0 Added utf8 to Datapacket to make the remote IMeshService work 2021-04-13 17:42:24 -07:00
Kevin Hester
5b653d29f8 reformat per coding conventions 2021-03-29 20:33:06 +08:00
Paul Mandal
a6c80cc203 Add hopLimit to the DataPacket class, update MeshService to use hopLimit when building its MeshPackets 2021-02-27 22:36:06 -07:00
Kevin Hester
65e91c46d3 fix #209. don't ignore messages from nodes that only have partial nodeinfo 2021-02-08 11:22:15 +08:00
Kevin Hester
2e30dbcdd0 switching away from kotlin-android-extensions 2020-12-07 20:44:17 +08:00
Kevin Hester
cc2b99fdfc WIP for new protobufs 2020-12-07 19:50:06 +08:00
geeksville
7506d712ff message status updates are coded but not yet tested. 2020-05-30 19:58:36 -07:00
geeksville
6031b5eaa0 clean up message API to/from mesh service, to allow clients to get
updates on message status
2020-05-30 15:55:47 -07:00
geeksville
67d95039bf begin support for message status 2020-05-30 14:38:16 -07:00