Button Press System
The button press system in ASG Client handles physical button interactions on the smart glasses.How It Works
- The user presses the camera button on the glasses.
- The BES microcontroller classifies the press and sends a K900 command:
cs_phofor short presscs_vdofor long press- newer firmware can also report
hs_ntfywith"button click"or"button long click"
K900CommandHandlerforwards every button press to the phone as abutton_pressevent.- ASG Client decides whether to also capture locally using the gallery/save-mode gate.
Button Press Event
Every camera-button press is forwarded to the phone when Bluetooth is connected:pressType is "short" or "long". Apps can react to this event even when the glasses also capture locally.
Local Capture Gate
There is no separate “photo mode” versus “video mode” button configuration. Whether the button also captures locally is controlled bysave_in_gallery_mode, persisted in AsgSettings.isSaveInGalleryMode().
- When gallery/save mode is active, button presses capture locally.
- When gallery/save mode is inactive and the glasses are connected, button presses are only forwarded to the phone/apps.
- When the glasses are disconnected, button presses still capture locally so the press is not lost.
Short Press
If a video is currently recording, short press stops the recording. Otherwise, short press takes a photo using the persisted photo settings. Settings used:button_photo_setting: photo size, one ofsmall,medium, orlargebutton_camera_led: whether to use the privacy LED during capture
Long Press
If a video is currently recording, long press stops the recording. Otherwise, long press starts video recording after the battery check. Settings used:button_video_recording_setting: width, height, and fpsbutton_max_recording_time: automatic stop timeoutbutton_camera_led: whether to use the privacy LED during recording
Other Button Commands
Besides the camera button, ASG Client also handles:- Swipe gestures from arm swipes
- Battery status updates
- Hotspot control commands
Troubleshooting
- Check logs for
cs_pho,cs_vdo, orhs_ntfy. - Confirm
button_pressis forwarded over BLE when connected. - Verify
save_in_gallery_modeif local capture is unexpectedly enabled or disabled. - Confirm camera and storage permissions if local capture fails.

