Objects
The shape of every object the SDK returns or delivers on an event.
NativeCommandResult
What every browser command resolves to. It tells you whether the call reached the app — not the outcome of the native action (that arrives on an event). The common case is triggered: true. Outside the app a command comes back with triggered: false — pending in a browser tab, skipped in a non-DOM environment.
| Property | Type | Description |
|---|---|---|
command | string | The native command that was dispatched. |
queued | boolean | Whether it was added to the queue. |
triggered | boolean | Whether it was handed to the app. Branch on !triggered for a web fallback. |
skipped | boolean | Whether it was dropped without triggering. |
pending | boolean | Queued, waiting for the app. A browser tab outside the app resolves here. |
reason | string | Why it was skipped or pending — e.g. waiting_for_agent, not_native. |
BdkDeviceInfo
The device snapshot returned by bdk.ready() and bdk.getDeviceInfo(), and delivered on the deviceInfo event. Every field is null until the app reports it.
| Property | Type | Description |
|---|---|---|
playerId | string | null | OneSignal player id for push. |
pushToken | string | null | Device push token. |
deviceModel | string | null | Device model name. |
deviceOS | string | null | Operating system. |
deviceOSVersion | string | null | OS version. |
deviceLanguage | string | null | Device language. |
deviceWidth | string | number | null | Screen width. |
deviceHeight | string | number | null | Screen height. |
versionName | string | null | Host app version name. |
versionCode | string | number | null | Host app version code. |
biometricsAvailable | boolean | Whether biometric login is available. |
smartLoginAvailable | boolean | Whether saved login is available. |
cameraPermissionStatus | string | null | Camera permission state. |
contactsPermissionStatus | string | null | Contacts permission state. |
audiorecordPermissionStatus | string | null | Audio-record permission state. |
externalstoragePermissionStatus | string | null | Storage permission state. |
locationPermissionStatus | string | null | Location permission state. |
idfa | string | iOS advertising id. iOS only. |
MediaResult
Delivered by photoCaptured, photoSelected, audioRecorded, and screenshot. Use dataUri to preview inline and fileUrl to upload.
| Property | Type | Description |
|---|---|---|
fileUrl | string | null | Hosted URL of the file — use to upload. |
dataUri | string | null | Data URI — use to preview inline. |
contentType | string | null | The file's MIME type. |
data | — | The raw file data from the device. |
BiometricResult
Delivered on the biometricResult event after bdk.auth.authenticateBiometrics().
| Property | Type | Description |
|---|---|---|
status | string | "success" or "failed". |
platform | string | "ios" or "android". |
data | — | The raw native auth result. |
SmartLoginCredentials
Delivered on the smartLoginCredentials event. If either field is null, nothing usable is saved — fall back to your login screen.
| Property | Type | Description |
|---|---|---|
email | string | null | The saved email. |
password | string | null | The saved password. |
DeviceVariableResult
Delivered on the deviceVariable event after reading a cached value.
| Property | Type | Description |
|---|---|---|
name | string | The variable name. |
data | — | The stored value. |
UrlParam
A query parameter you pass to bdk.navigation.openLink({ urlParams }).
| Property | Type | Description |
|---|---|---|
key | string | The parameter name. |
value | string | number | boolean | The parameter value. |
BdkError
Thrown by a rejected command and passed to the onError config callback and the error event.
| Property | Type | Description |
|---|---|---|
code | string | One of BDK_NOT_NATIVE, BDK_NATIVE_UNAVAILABLE, BDK_UNSUPPORTED_VERSION, BDK_UNSUPPORTED_PLATFORM, BDK_LISTENER_ERROR, BDK_PROVIDER_ERROR, BDK_VALIDATION_ERROR. |
message | string | A human-readable description. |
details | object | Extra context about the error, when available. |
Event payloads
A few events deliver raw native data rather than a fixed object. Here's what each one contains.
| Event | Delivers |
|---|---|
contacts | The device address book — an array of contacts, each with a name, phone number(s), and email(s). |
location | The device location — latitude, longitude, and a resolved address. |
barcodeScanned | The scanned code — its type (e.g. qr) and decoded content. |
screenshot | The captured image, as a MediaResult. |
menuClicked | The menu item the user tapped. |
popupClosed | Which button dismissed the popup. |
datePicked | The date/time the user selected. |
optionPicked | The option the user chose. |
purchaseSuccess / purchaseFailed / receiptReceived | { platform, data } — the store's raw purchase details; verify server-side. |