Barcode Actions
os.showBarcode(code: string, format?: BarcodeFormat): ShowBarcodeAction
Shows a Barcode for the given data. Optionally accepts the format that the barcode should be displayed in.
The first parameter is a string and is the text or data that the generated Barcode should represent.
The second parameter is optional and is a BarcodeFormat and is the format that the barcode should be displayed in. Defaults to
"code128"
Examples
os.showBarcode("hello");
os.showBarcode("123456", 'upc');
os.hideBarcode(): ShowBarcodeAction
Closes the Barcode popup modal.
Examples
os.hideBarcode();
os.closeBarcodeScanner(): OpenBarcodeScannerAction
Closes the barcode scanner.
Examples
os.closeBarcodeScanner();
os.openBarcodeScanner(camera?: CameraType): OpenBarcodeScannerAction
Opens the Barcode scanner.
While open, each scanned Barcode will send a @onBarcodeScanned
shout. Optionally accepts which camera to use for scanning. (front/back)
The first parameter is optional and is a CameraType and a string specifing which camera to use. Defaults to 'rear'. If the given camera type is not available, then the default camera will be used. Possible values are
"rear"
and "
front
".
Examples
os.openBarcodeScanner();
os.openBarcodeScanner("front");
os.hideQRCode(): ShowQRCodeAction
Closes the QR Code popup modal.
Examples
os.hideQRCode();
os.showJoinCode(inst?: string, dimension?: string): ShowJoinCodeAction
Shows a QR Code with a link to join the given inst and dimension. If the inst and dimension are omitted, then the current inst and dimension will be used.
The first parameter is optional and is a string and is the inst that the code should be shown for. Defaults to the current inst.
The second parameter is optional and is a string and is the dimension that the code should be shown for. Defaults to the current dimension.
Examples
os.showJoinCode();
os.showJoinCode("inst", "dimension");
os.showQRCode(code: string): ShowQRCodeAction
Shows a QR Code for the given data.
The first parameter is a string and is the text or data that the generated QR Code should represent.
Examples
os.showQRCode("hello");
os.showQRCode("https://example.com")
os.closeQRCodeScanner(): OpenQRCodeScannerAction
Closes the QR Code scanner.
Examples
os.closeQRCodeScanner();
os.openQRCodeScanner(camera?: CameraType): OpenQRCodeScannerAction
Opens the QR Code scanner.
While open, each scanned QR Code will send a @onQRCodeScanned
shout.
Optionally accepts which camera to use for scanning. (front/back)
The first parameter is optional and is a CameraType and a string specifing which camera to use. Defaults to 'rear'. If the given camera type is not available, then the default camera will be used. Possible values are
"rear"
and "
front
".
Examples
os.openQRCodeScanner();
os.openQRCodeScanner("front");