Package com.cefrium
Interface CefriumBrowser.DeviceChooserSession
- Enclosing class:
CefriumBrowser
public static interface CefriumBrowser.DeviceChooserSession
A live device chooser. When a page calls
navigator.bluetooth.requestDevice(), navigator.usb.requestDevice()
or navigator.serial.requestPort() under a user gesture, the handler
receives a session; candidate devices then stream in via CefriumBrowser.DeviceChooserHandler.onDeviceAdded(com.cefrium.CefriumBrowser.DeviceChooserSession, com.cefrium.CefriumBrowser.ChooserDevice). The app presents its own picker and
calls select(java.lang.String) or cancel(). Exactly one of those should be
called; further calls are ignored.-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Dismiss the chooser; the page's request promise rejects.The origin (e.g.intgetType()voidContinue the request with the chosen device (an id fromCefriumBrowser.ChooserDevice).
-
Method Details
-
getType
int getType() -
getOrigin
String getOrigin()The origin (e.g."https://example.com") that requested a device. -
select
Continue the request with the chosen device (an id fromCefriumBrowser.ChooserDevice). -
cancel
void cancel()Dismiss the chooser; the page's request promise rejects.
-