feat(example): Add packet log and UI improvements#4455
Open
jamesarich wants to merge 1 commit intomainfrom
Open
feat(example): Add packet log and UI improvements#4455jamesarich wants to merge 1 commit intomainfrom
jamesarich wants to merge 1 commit intomainfrom
Conversation
This commit enhances the `mesh_service_example` application by adding a packet log and improving the user interface. **Features:** - A new collapsible "Packet Log" section has been added to the main screen to display timestamped events like connections, disconnections, sent/received packets, and API requests. - The "Mesh Nodes" list is now a collapsible section to improve layout and user experience. **UI & UX:** - A custom `ExampleTheme` is introduced, supporting dynamic colors on Android S+ for a more modern look and feel. - The `LazyColumn` in `MainScreen` is now used more effectively by replacing `forEach` loops with `items`, which is better for performance. **Bug Fixes & Refinements:** - Fixes the `decodeOrNull` extension to correctly handle empty `ByteString` or `ByteArray` by returning a default/empty proto message instead of `null`, as Wire decodes empty bytes into an empty message. - The `BroadcastReceiver` is now registered as `RECEIVER_EXPORTED` on Android 13+ to ensure it can receive broadcasts from the Meshtastic service app. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4455 +/- ##
========================================
- Coverage 8.57% 8.54% -0.03%
========================================
Files 420 420
Lines 14184 14217 +33
Branches 2358 2359 +1
========================================
- Hits 1216 1215 -1
- Misses 12748 12782 +34
Partials 220 220 ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit enhances the
mesh_service_exampleapplication by adding a packet log and improving the user interface.Features:
UI & UX:
ExampleThemeis introduced, supporting dynamic colors on Android S+ for a more modern look and feel.LazyColumninMainScreenis now used more effectively by replacingforEachloops withitems, which is better for performance.Bug Fixes & Refinements:
decodeOrNullextension to correctly handle emptyByteStringorByteArrayby returning a default/empty proto message instead ofnull, as Wire decodes empty bytes into an empty message.BroadcastReceiveris now registered asRECEIVER_EXPORTEDon Android 13+ to ensure it can receive broadcasts from the Meshtastic service app.