Files
faceclaw/app/phone-ui
JMO 423f9fbcd1 Refuse the flash with a reason when the glasses are in silent mode
Silent mode blanks the display and stops the firmware dispatching input while
BLE and GATT stay up, so the create-prompt page is written, accepted, and never
rendered. There is no touchpad event available to answer it with, and the flash
ends after four attempts on "prompt page not acked", which tells the wearer
nothing about what is wrong or what to do about it.

readBattery was already performing a sid-0x09 settings read whose ack carries
silentMode next to the battery, and the field was being discarded. readSettings
is factored out so one read serves both callers, and requireNotSilent runs it
before the prompt page is written. A positive report throws, and the existing
error path turns the message into what the wearer sees: that the glasses are in
silent mode, and that long-pressing both touchpads leaves it.

It refuses only on a positive report. An arm that does not answer, and firmware
whose ack omits the field, both fall through to the prompt exactly as before, so
older firmware is unaffected and a missing answer can never block a flash.

This replaces the phone-side confirmation fallback that was here before. An
unacked page is not by itself evidence that the prompt was never displayed, and
the on-lens step is what proves the glasses being flashed are the ones in front
of you, so overriding it on a timeout gave up more than it was worth.
2026-09-23 08:12:19 -07:00
..

Main-screen UI

Android and iOS share remote-controls.xml, remote-controls.css, and RemoteControlsViewModel: tab order and selection, screen-size choices, brightness/Auto settings, watch labels, ring markings, and microphone/keyboard buttons. Import the stylesheet at the top of each platform's application CSS (before any rules), so the NativeScript CSS pipeline includes it.

Android's MainViewModel extends that shared model and connects it to dashboardController. iOS loads the same XML with Builder.load and connects it to IosPreviewController. Keep platform-specific transport, page lifecycle, and navigation in those adapters. Android uses NativeScript gesture events; iOS feeds raw touches to PhoneGestureRecognizer, so the discrete pad gesture bindings in the XML are Android-only to avoid delivering each gesture twice.

The iOS shell uses the same portrait preview-above-controls layout and 345-DIP landscape controls column. It respects safe areas, uses the same overflow menu labels/order, and retains device diagnostics under the connection status. Conversations and Record screen are disabled on iOS because their storage and recording services are currently Android-only. Take screenshot opens the iOS share sheet. Text settings still use native dialogs. Keyboard input uses the shared keyboard-input-panel.xml multiline editor and shell keyboard session, with separate Agent and App destinations when available. iOS keeps the editor above the software keyboard in both orientations.

Voice input uses the glasses microphone when connected and the phone's default audio input in preview mode. The phone path requires both Speech Recognition and Microphone permissions and stops when Faceclaw leaves the foreground; connected-glasses capture retains its existing background behavior.

The iOS microphone and keyboard image assets are 3x rasterizations of the Android vector drawables with the same names; regenerate them from those vectors if the icon designs change.