Skip to content

feat(example): Add packet log and UI improvements#4455

Open
jamesarich wants to merge 1 commit intomainfrom
feat/mesh-service-example-aidl
Open

feat(example): Add packet log and UI improvements#4455
jamesarich wants to merge 1 commit intomainfrom
feat/mesh-service-example-aidl

Conversation

@jamesarich
Copy link
Collaborator

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.

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>
@github-actions github-actions bot added the enhancement New feature or request label Feb 5, 2026
@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 4.87805% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 8.54%. Comparing base (854eff6) to head (0b3f62c).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...android/meshserviceexample/MeshServiceViewModel.kt 0.00% 32 Missing ⚠️
...htastic/android/meshserviceexample/MainActivity.kt 0.00% 6 Missing ⚠️
...eshtastic/android/meshserviceexample/MainScreen.kt 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant