2593 Commits

Author SHA1 Message Date
Ken Piper
c7c29cb1c1 feat: Initial implementation of low battery notifications for nodes (#1653)
* 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
2025-03-08 04:52:30 -06:00
James Rich
f7731f0c98 chore: Update minimum required firmware version (#1658)
Updated the minimum required firmware version to 2.3.15.
2025-03-07 14:27:28 -06:00
James Rich
6dfb6a56d6 feat: expand role confirmation to include REPEATER (#1657)
* Clarify role change behavior

The role change logic was modified to show a confirmation dialog when the role is set to `ROUTER`, `ROUTER_CLIENT`, or `REPEATER`. Previously, the dialog was only displayed when setting the role to `ROUTER`.

* Implement router role confirmation dialog

- Added a confirmation dialog when changing the device role to ROUTER, ROUTER_CLIENT, or REPEATER.
- The confirmation dialog ensures users are aware of the implications of selecting a role used for infrastructure.
- Updated the logic to set the selected role only after confirmation.
- Only show dialog when changing to infrastructure roles.

* remove deprecated ROUTER_CLIENT to avoid confusion
2025-03-07 14:26:57 -06:00
James Rich
d40672df40 fix #1654: Move the app rating dependency to googleImplementation (#1656)
* Move the app rating dependency to googleImplementation

The `awesome.app.rating` dependency is now under `googleImplementation` instead of `implementation` in `app/build.gradle`.

* Refactor alert DND dialog padding

Use `dpToPx` for padding in the alert DND dialog for better consistency.
2025-03-07 14:25:46 -06:00
James Rich
68cd540f9e fix #1634 #1552: Update Paxcount display condition (#1635)
Modify the Paxcount display logic to show the string if either `ble` or `wifi` is not zero, rather than requiring both to be non-zero.

Signed-off-by: James Rich <james.a.rich@gmail.com>
2025-03-05 07:59:28 -06: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
James Rich
2859bed416 feat #1611: Add confirmation dialog when changing to router role (#1636)
* Add confirmation dialog for changing to router role

Introduced a confirmation dialog that will be shown when changing the device role to "router".
The confirmation dialog includes links to the "Device Role Documentation" and "Choosing The Right Device Role" blog post.
The user must check a checkbox to confirm.

* Update router role handling

Modified the handling of the router role in `DeviceConfigItemList.kt` to avoid returning prematurely from the `onItemSelected` lambda. This ensures that the role is updated properly when a user selects the "ROUTER" role.

* removes konami code check, remove testing code

* Refactor router role confirmation text

- Moves the router role confirmation text to strings.xml.
- Updates to use `AnnotatedString.fromHtml` instead of `buildAnnotatedString` and `withLink`.
- Changes from hard-coded strings to string resources.
2025-03-05 07:26:19 -06:00
Joshua Soberg
749c4b4918 fix #1616: Calculate DP to pixel value for map label offset (#1637) 2025-03-04 14:40:57 -06:00
Joshua Soberg
c597b3b000 fix #1554 (a11y): Add content description to tabs for screen reader support (#1631) 2025-03-02 09:22:24 -06:00
Joshua Soberg
d8f67e011a fix #1615: Add explicit signed int editing preference (#1629) 2025-03-02 09:20:27 -06:00
Joshua Soberg
5da827473a fix #1616 (a11y): Use SP font size for marker labels on the map (#1630)
* Use and SP font size for marker labels on the map

* Fix detekt issue
2025-03-02 09:14:12 -06:00
James Rich
1a11c3351b Refactor NodeDetail.kt to use has*() functions (#1627)
Modified NodeDetail.kt to replace direct comparisons with 0f or 0 for sensor values with corresponding has*() functions.
This change improves code readability by clearly indicating the presence or absence of sensor data.
2025-03-02 06:12:07 -06:00
Ken Piper
b316e066ad fix: Add the "When" to new message notifications (#1628) 2025-03-02 06:11:33 -06:00
Joshua Soberg
2f48e8e68a chore: Unused code cleanup (#1612)
* 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
2025-02-27 16:18:42 -06:00
Joshua Soberg
ef64df3515 fix: Stop overriding surface/onSurface in theme (#1605)
Fixes #1604
* Stop overriding surface/onSurface in theme

* Wrap preview in AppTheme to get a better representation of what it'll look like on-device
2025-02-22 14:06:56 -06:00
Joshua Soberg
8fee9dbc45 fix: Accommodate large font for node filter (#1602)
Fixes #1561

* Add large font preview

* Adjust default min size such that the filter input will accomodate larger fonts. Also, align the dropdown icon and use body1 typography for input text

* Add license and newline to fix detekt issues
2025-02-22 12:57:30 -06:00
Robert-0410
85d6e0ccdf feat: Graphs Blue Color (#1597)
* Changed the humidity color on the graph to the same blue used for current in the power graph.

* Refactor: Centralized the blue used in both the Env and Pow metrics in CommonCharts.kt.

---------

Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2025-02-22 09:39:46 -06:00
Joshua Soberg
5430169830 Add an animation to user node list items to animate on details expansion (#1590) 2025-02-16 14:37:49 -06:00
James Rich
8ddd553753 chore: update proto submodule to v2.5.22 (#1589) 2025-02-16 10:48:30 -06:00
Joshua Soberg
ed52a5360f Apply a background to the filter search sticket header so that list items don't show behind it when scrolling (#1588) 2025-02-16 10:22:06 -06:00
Joshua Soberg
37489604f0 Introduction of stable Compose UI State and some simple animations in Debug Panel (#1575)
* Add dependency to KotlinX immutable collections

* Build a Compose-stable UI state vs using a database model. Move appropriate mapping logic for converting database model -> UI state into the view model. Introduce animations to new log placement and automated scroll.

* Center the top card row vertically

* Move log message generation into separate method

---------

Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2025-02-16 06:09:41 -06:00
Ken Piper
e15ad23c46 feat: Initial implementation of adding nodes to favorites (#1520)
* 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>
2025-02-16 06:02:02 -06:00
James Rich
584fe8d6f8 fix: limit quick chat append, prevent duplicates (#1522)
Limits quick chat append to 200 characters and prevents duplicate appends.
Also sets a constant for the max message size.

fixes #1511
2025-02-16 05:51:54 -06:00
Robert-0410
b067a0c0b3 feat: Power graph (#1556)
* Refactor: We can draw the horizontal lines for the graphs independent of min and max entries.

* Added navigation to the PowerMetrics log with a skeleton screen.

* Drew channel 1 voltage.

* Refactor: Assigned colors for the data within the enum instead of a list-ordinal combo.

* Plotted Ch1 current line.

* Refactor: Did not need the parameters being used to get the desired ui in the TimeLabels composable.

* Added a row to help distinguish between units.

* Refactor: MetricsTimeSelector.kt to SlidingSelector.kt; the new version allows for generic options.

* Added a sliding selector to choose between power channels and changed the legend data to instead display current and voltage.

* We now plot the line for which the user has selected a power channel option.

* Don't need the current line to be dotted anymore.

* Don't think we need to display an info dialog for voltage and current.

* Wrote card to display the power channel data entries.

* detekt

* Refactor: current color change to accommodate the themes better

---------

Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2025-02-15 22:37:05 -06:00
Joshua Soberg
24abd1ac4a fixes #1557: Filter out emojis when creating short names (#1578)
* Filter out emojis from text when finding initials

* Confirm non-English non-emoji unicde isn't filtered

* Remove unused example unit test

---------

Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2025-02-15 22:25:35 -06:00
James Rich
e11d726e27 feat: Add RAK2560 hardware model and graphic (#1543)
Adds the RAK2560 to the list of supported devices and associates it with the corresponding vector drawable.
2025-02-15 22:17:57 -06:00
Ken Piper
86128a19c8 Add missing units to node details info cards 2025-02-15 22:07:49 -06:00
andrekir
a3a3958dfb refactor: move NavGraph to navigation package 2025-01-11 09:29:48 -03:00
andrekir
e196bfb683 refactor: encapsulate NodeDetail navigation 2025-01-11 09:29:48 -03:00
andrekir
0d5157eb36 refactor: extract Routeto navigation package 2025-01-11 09:29:48 -03:00
andrekir
ad9a3a5e49 refactor: move RadioConfig files to separate package 2025-01-11 08:02:54 -03:00
andrekir
7794c08190 refactor: replace Scaffold with internal component 2025-01-06 19:50:25 -03:00
andrekir
1c863f35f6 refactor: migrate ShareFragment to Compose 2025-01-06 19:16:40 -03:00
andrekir
0635b25e1c refactor: remove deprecated AppCompatTheme 2025-01-06 18:38:49 -03:00
andrekir
7bb0d424ad refactor: group power metrics by channel 2025-01-05 21:41:22 -03:00
andrekir
c1ca8f919d fix: switch preference bottom padding 2025-01-04 16:20:16 -03:00
andrekir
41b067bad2 chore: update Crowdin localization strings 2025-01-04 15:48:15 -03:00
andrekir
e73a67909a refactor: replace message chip with user avatar 2025-01-04 15:34:26 -03:00
Robert-0410
70a08c9d31 feat: Scrollable Signal Chart (#1505)
* Removed repeated calculation.

* Centralized the radius used to plot points and draw lines within GraphUtil.kt.

* Updated the signal metrics chart to use the scroll features.

* SignalMetricsChart long method warning suppression.
2025-01-03 09:02:32 -03:00
andrekir
d14a8de78e chore: update Crowdin localization strings 2025-01-02 08:13:08 -03:00
andrekir
5dcfe0e68a feat: add ROUTER_LATE role description 2025-01-02 08:05:40 -03:00
andrekir
cf95dd0711 chore: update device_hardware.json 2025-01-02 07:39:54 -03:00
andrekir
13b615a470 chore: update license header 2025-01-02 07:00:51 -03:00
Andre K
60e7e18116 feat(config): implement excluded modules validation (#1460)
* 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
2025-01-02 06:38:33 -03:00
andrekir
bdefbc3ce2 chore: update proto submodule to v2.5.18 2025-01-02 06:30:38 -03:00
Robert-0410
16a8503207 refactor: Line breaks for time separations linked to TimeFrame (#1502) 2024-12-23 07:34:22 -03:00
Robert-0410
45e50b829a refactor: 24H and 48H intervals (#1500) 2024-12-23 07:26:58 -03:00
andrekir
ed45d0ff96 fix: replace TODO with debug message for unhandled admin payload 2024-12-22 07:14:53 -03:00
andrekir
e924f274f1 fix: allow auto-capitalization for message input field 2024-12-22 07:14:52 -03:00
andrekir
93ffc5f838 chore: update device_hardware.json 2024-12-22 07:05:02 -03:00