Skip to content

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

Merged
jamesarich merged 2 commits into
mainfrom
feat/mesh-service-example-aidl
Feb 5, 2026
Merged

feat(example): Add packet log and UI improvements#4455
jamesarich merged 2 commits into
mainfrom
feat/mesh-service-example-aidl

Conversation

@jamesarich

Copy link
Copy Markdown
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

codecov Bot commented Feb 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 5.00000% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 8.54%. Comparing base (854eff6) to head (cba1a11).
⚠️ Report is 8 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% 5 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   14216      +32     
  Branches    2358    2359       +1     
========================================
- Hits        1216    1215       -1     
- Misses     12748   12781      +33     
  Partials     220     220              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@jamesarich jamesarich added this pull request to the merge queue Feb 5, 2026
@jamesarich jamesarich removed this pull request from the merge queue due to a manual request Feb 5, 2026
@jamesarich jamesarich merged commit f1520eb into main Feb 5, 2026
7 of 8 checks passed
@jamesarich jamesarich deleted the feat/mesh-service-example-aidl branch February 5, 2026 13:24
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