Skip to content

Reference README, brand + Material 3 app, and the first hardware-driven app fixes - #1

Merged
lkasso merged 9 commits into
mainfrom
docs/readme-reference-and-polish
Aug 17, 2026
Merged

Reference README, brand + Material 3 app, and the first hardware-driven app fixes#1
lkasso merged 9 commits into
mainfrom
docs/readme-reference-and-polish

Conversation

@lkasso

@lkasso lkasso commented Aug 17, 2026

Copy link
Copy Markdown
Member

TL;DR

The first public iteration of the app and docs, plus everything a real-board test pass with the app turned up.

Docs

  • README rewritten as a full reference manual (344 → ~1,830 lines): TOC, requirements, supported boards, quick start, architecture, layer-by-layer, sensor protocol interfaces, one subsection per board module with source-verified code samples, logging / firmware / persistence guides, BLE packet format, testing, known gaps.

App — brand and presentation

  • Exact #FE9500 palette + semantic colors as light/dark Material 3 schemes (dynamic color off); adaptive "m" launcher icon (glyph verified inside the 66 dp safe zone); branded scan background; native Material components and section ordering aligned across the app family.

App — fixes from testing on a Pixel 7 + MetaMotion S

  • INTERNET permission declared (firmware catalog fetch was refused on-device).
  • Demo mode removed from every user-facing surface; DemoBleTransport moved to the test source set (still drives 23 end-to-end JVM tests).
  • Logging screen reconciles with the board: a session the app didn't start is surfaced as "Logging" with a Stop action that keeps entries; stale local records for cleared data are dropped. New SDK stopAndRemoveLoggers() with a wire-byte test.
  • Download feedback above the fold: status card → Download section (pending, live progress with entry count/percent, completion) → sensor picker. Downloads previously completed silently below a full screen of picker.
  • Settings › Logging: entries in flash, every armed logger (module / register / byte range), refresh, confirmed Clear Logs & Loggers.
  • Sensor picker split into Motion / Fusion / Environmental collapsible groups (open only when a sensor inside is selected) — the whole Logging screen fits on one screen.
  • Opaque top bar (content no longer scrolls under the title); logger rows as ListItems.

Structure

Area Notes
README.md, HARDWARE.md reference manual; counts current
app/.../ui/theme/, res/mipmap-*, manifest palette, adaptive icon, INTERNET
app/.../ui/{scan,device,stream,logging,sessions,controls,settings,firmware}/, ui/components/ Material pass, collapsible picker, logging screen order, settings Logging section
app/.../vm/{LogSessionViewModel,SettingsViewModel}.kt board reconcile, logging status/clear
app/src/test/.../demo/DemoBleTransport.kt moved from main
metawear-protocol/.../DeviceLogging.kt (+ LoggingTest.kt) stopAndRemoveLoggers()

Test plan

  • JVM gate green: protocol 1043 · persistence 46 · firmware 66 · app 120 = 1275
  • :app:assembleDebug, :metawear-core:assembleDebugAndroidTest build; lint 0 errors
  • Provenance sweep clean on all changed files; app/src/main has no demo references
  • README: identifier spot-check against sources; banned-word grep clean; TOC anchors resolve
  • On device (Pixel 7 + MetaMotion S): launcher icon; scan/connect; Settings › Logging shows real loggers/entries and clears; Logging screen shows the board's own session as Logging → Stop; Start → Stop → Download shows live 23 % → "Download complete · 747 samples" saved to Session History; foreign-log recovery of 6,144 stale entries → 2,908-sample session; collapsible picker on Live Stream + Logging
  • Owner sign-off after retest on device

lkasso and others added 9 commits August 16, 2026 19:28
Table of contents, requirements and supported boards, quick start,
architecture and layer-by-layer breakdown, the sensor protocol
interfaces, one documented subsection per board module with code
samples verified against the sources, the logging guide (download,
MMS flush, CSV, calibration, board state, anonymous signals, polled
readables, processor handles), firmware updates and MetaBoot, Room
persistence, data modes, BLE packet format, testing, demo mode, design
notes and known gaps. HARDWARE.md test count refreshed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Exact brand palette (#FE9500 primary plus teal-green success, gold
  warning, coral danger, dusty-blue info) as light and dark Material 3
  schemes with dynamic color off; chart channel colors unchanged.
- Adaptive launcher icon from the "m" brand artwork: the glyph's
  enclosing circle is positioned inside the 66 dp safe zone (verified
  under circle and squircle masks), monochrome layer, legacy mipmaps.
- Branded scan background: solid orange field, light-mode veil, five
  scan ripples from the bottom-leading corner, watermark "m"; device
  rows as Material cards on top.
- Native Material patterns throughout (TopAppBar, grouped ListItem
  cards, FilterChips, Switch, Snackbar, AlertDialog confirms, sliders,
  system share sheet); status/battery/RSSI chips; per-screen section
  ordering aligned across the app family. Presentation only — no logic
  or ViewModel changes; 120 app tests unchanged and green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Demo mode is gone from every user-facing surface: no toggle, no
simulated boards on the scan screen, no demo candidates in group
logging, no settings hints; Bluetooth-off shows a plain empty state.
DemoBleTransport moves to the app's test source set, where it remains
the fixture that drives the real device stack for 23 JVM end-to-end
tests (logging round-trips, group capture, process-restart recovery).
README and HARDWARE.md no longer advertise an app demo mode.

The app manifest never declared android.permission.INTERNET, so the
firmware server's catalog fetch was refused on-device. Declared, with
the reason.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Shows what the board's logging module holds: LOG_LENGTH entry count and
every armed logger (id, module, register, chunk) — including stale ones
left by earlier sessions or other apps — with Refresh and a confirmed
Clear Logs & Loggers action (stops on-board logging, drops entries,
removes all loggers). After a clear the count is set to zero locally
rather than re-read, since the MMS reports a housekeeping sentinel for
up to a minute.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The screen was driven purely by the app's local session records, so it
showed Start while the board was already logging (loggers armed by an
earlier run, another app, or a lost record) and Download after the data
had been cleared out from under a stale record.

LogSessionViewModel now reconciles with the board on entry: loggers
armed with no local running session surfaces a new BoardLogging phase
(status card + a Stop board action); local pending records with no
loggers and no entries on the board are dropped. SDK gains
stopAndRemoveLoggers() — disable logging and remove all loggers while
keeping flash entries recoverable — with a wire-byte test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The per-logger detail was rendered through the two-column label/value
row, and its width starved the label into a one-character column. Each
logger is now a ListItem (headline + supporting byte-range line). The
default AppScaffold top bar was transparent at rest — its scrolled color
swap depends on a scrollBehavior that was never wired — so list content
scrolled up underneath the title; it is now opaque.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The download progress and result cards were the last items in the
LazyColumn, below the full sensor picker — a download would run to
completion (7 s for 2,560 entries on a MetaMotion S) with nothing
visible on screen, so it looked like the button did nothing. Status
card, then the Download section (pending records, live progress with
entry count and percent, completion with per-session rows), then the
sensor picker. Top-bar action for a board-owned session is now Stop,
with the status card explaining that the session was started earlier.

Verified end to end on hardware: Start → Stop → Download shows live
23% → complete, 747 samples saved to Session History.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The 16-sensor picker was a flat wall of cards on both the Live Stream
and Logging screens, pushing everything below it (active loggers,
download) two screens down. Motion & Fusion is split into two groups,
and each of the three groups sits behind a tappable header that starts
expanded only when one of its sensors is selected — the common case is
one open group of three rows and two folded lines. Collapsed headers
still show a "N selected" count.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ging section, test counts

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lkasso lkasso changed the title Reference README, brand palette + launcher icon, Material 3 presentation Reference README, brand + Material 3 app, and the first hardware-driven app fixes Aug 17, 2026
@lkasso
lkasso merged commit 5e2a3b9 into main Aug 17, 2026
2 checks passed
@lkasso
lkasso deleted the docs/readme-reference-and-polish branch August 17, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant