barCode module
Note
This namespace is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Module to interact with the barcode scanning-specific part of the SDK.
Interfaces
BarCodeConfig |
Data structure to customize the barcode scanning experience in scanBarCode API. All properties in BarCodeConfig are optional and have default values in the platform |
Functions
has |
Checks whether or not media has user permission |
is |
Checks if barCode capability is supported by the host |
request |
Requests user permission for media |
scan |
Scan Barcode or QRcode using camera |
Function Details
hasPermission()
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Checks whether or not media has user permission
function hasPermission(): Promise<boolean>
Returns
Promise<boolean>
true if the user has granted the app permission to media information, false otherwise
isSupported()
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Checks if barCode capability is supported by the host
function isSupported(): boolean
Returns
boolean
boolean to represent whether the barCode capability is supported
requestPermission()
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Requests user permission for media
function requestPermission(): Promise<boolean>
Returns
Promise<boolean>
true if the user has granted the app permission to the media, false otherwise
scanBarCode(BarCodeConfig)
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Scan Barcode or QRcode using camera
function scanBarCode(barCodeConfig: BarCodeConfig): Promise<string>
Parameters
- barCodeConfig
- BarCodeConfig
input configuration to customize the barcode scanning experience
Returns
Promise<string>
a scanned code