Package com.cefrium
Interface CefriumBrowser.DeviceChooserHandler
- Enclosing class:
CefriumBrowser
public static interface CefriumBrowser.DeviceChooserHandler
Presents device chooser UI for the frontier web device APIs. Without a
handler set, such requests are cancelled (the page promise rejects) —
the engine has no built-in picker in this embedding. All methods are called
on the UI thread.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonDeviceAdded(CefriumBrowser.DeviceChooserSession session, CefriumBrowser.ChooserDevice device) A candidate device became available (called repeatedly while a Bluetooth scan runs; once per present device for USB/Serial).voidThe engine closed the chooser (e.g.default voidonDeviceRemoved(CefriumBrowser.DeviceChooserSession session, String deviceId) A device previously reported toonDeviceAdded(com.cefrium.CefriumBrowser.DeviceChooserSession, com.cefrium.CefriumBrowser.ChooserDevice)is no longer available (e.g.voidA chooser opened; present UI and keepsessionto resolve it.
-
Method Details
-
onShowDeviceChooser
A chooser opened; present UI and keepsessionto resolve it. -
onDeviceAdded
void onDeviceAdded(CefriumBrowser.DeviceChooserSession session, CefriumBrowser.ChooserDevice device) A candidate device became available (called repeatedly while a Bluetooth scan runs; once per present device for USB/Serial). May repeat for the same id to update its label. -
onDeviceRemoved
A device previously reported toonDeviceAdded(com.cefrium.CefriumBrowser.DeviceChooserSession, com.cefrium.CefriumBrowser.ChooserDevice)is no longer available (e.g. a USB/serial device was unplugged mid-chooser). Remove it from the picker. Not called for Bluetooth scans (which only add). Optional; the default does nothing. -
onDeviceChooserClosed
The engine closed the chooser (e.g. navigation); dismiss the picker.
-