ChangelogEdit pageSTAFFOpen dashboard

Diagnostics

struct · Swiftdata class · Kotlintype · TypeScriptclass · Dart

Where Bubbl stands on this device, for support and for your own debug screen. The same fields everywhere, plus a few of each platform's own.

Call Bubbl.diagnostics() for a snapshot. On Android it's a suspend function with a callback variant, on iOS async with a completion variant, and on Flutter and React Native it returns a future or promise. See Bubbl for the signatures and Testing and diagnostics for what to look for.

Fields#

installId is how you find this device in the dashboard: search for it under Dashboard › Active users, for example to send it a test push.

data class Bubbl.Diagnostics.

started
Boolean
start has been called and Bubbl is running on this device.
sdkVersion
String
This SDK's version.
sdkSupported
Boolean
false when the workspace requires a newer SDK.
registered
Boolean
This install has its credential with Bubbl. true straight away when started with a device credential.
installId
String?
This install's id (device_id in the dashboard). null before start.
active
Boolean
Running: started, consent allows it, not paused by the server, supported.
pausedUntil
Long?
Unix seconds until which the server paused Bubbl, if it has.
consentRequired
Boolean
Started with requireConsent.
consent
Boolean?
The answer given to setConsent; null if none yet.
locationEnabled
Boolean
Bubbl may use location (setLocationEnabled).
permissions
BubblPermissionStatus?
Where the device stands on the permissions Bubbl uses, as permissions.status().
hasPushToken
Boolean
Bubbl has an FCM token for this device.
geofences
Int
How many geofences Bubbl is watching.
queuedEvents
Int
Events waiting to be sent.
lastError
String?
The last error Bubbl logged; null if none.
backgroundLocation
Boolean
Default false. Geofences work with the app closed ("Allow all the time"); otherwise only while it's open.
transitionsDroppedWhileLocked
Int
Default 0. Always 0 on Android, which delivers geofence events once the phone is unlocked after a reboot.
backgroundRestricted
Boolean
Default false. Android only. The user restricted the app's background activity in settings, so Bubbl can't run with the app closed.
batteryOptimized
Boolean
Default true. Android only. Battery optimisation applies (the default), so background work may be delayed in Doze.
credentialRejected
Boolean
Default false. The server refused the credential Bubbl was started with; Bubbl has stopped until it's started with a new one.
supported
Boolean
Default true. This device runs Bubbl: Android 8.1 (API 27) or newer, as Bubbl.isSupported.
environment
String?
"sandbox" or "production", once the server has said; null before, or from a server that predates Sandbox.
testDevice
Bubbl.TestDevice?
In Sandbox, this device's approval as a test device; null in Production.

public struct Bubbl.Diagnostics: Sendable, Equatable. It has no public initializer.

started
Bool
start has been called and Bubbl is running on this device.
supported
Bool
Bubbl works on this device (iOS 17 and later), as Bubbl.isSupported.
sdkVersion
String
This SDK's version.
sdkSupported
Bool
false when the workspace requires a newer SDK.
registered
Bool
This install has its credential with Bubbl. true straight away when started with a device credential.
installId
String?
The install id Bubbl keeps; nil before there is one.
active
Bool
Running: started, consent allows it, not paused by the server, supported.
pausedUntil
Int64?
Unix seconds until which the server paused Bubbl, if it has.
consentRequired
Bool
Started with requireConsent.
consent
Bool?
The answer given to setConsent; nil if none yet.
locationEnabled
Bool
Bubbl may use location (setLocationEnabled).
permissions
BubblPermissionStatus?
Where the device stands on the permissions Bubbl uses, as permissions.status().
hasPushToken
Bool
Bubbl has an APNs device token for this device.
geofences
Int
How many geofences Bubbl is watching.
queuedEvents
Int
Events waiting to be sent.
lastError
String?
The last error Bubbl logged; nil if none.
credentialRejected
Bool
Started with a credential the server refused; Bubbl has stopped until it's started with a new one.
backgroundLocation
Bool
Geofences work with the app closed ("Always"); otherwise only while it's open.
transitionsDroppedWhileLocked
Int
Geofence entries and exits that happened before the first unlock after a reboot, and couldn't be kept.
backgroundRefreshAvailable
Bool
iOS only. Background App Refresh is on for the app.
lowPowerMode
Bool
iOS only. Low Power Mode is on, which holds background work back.
osWatchesGeofences
Bool
iOS only. iOS watches the geofences ("Always", precise location, and a device that can). Otherwise they're checked from location changes, which is coarser.
environment
String?
"sandbox" (a pk_test_ key) or "production" (pk_live_); nil before the device has registered, or from a server that predates Sandbox.
testDevice
Bubbl.Diagnostics.TestDevice?
In Sandbox, where this device stands as a test device; nil in Production.

class BubblDiagnostics, with the fields both platforms have, then each platform's own, which are null on the other platform. It also has a const constructor and a BubblDiagnostics.fromMap(Map<String, Object?> map) factory.

supported
bool
Bubbl works on this device (Android 8.1, iOS 17 and later), as Bubbl.isSupported.
environment
String?
"sandbox" (a pk_test_ key) or "production" (pk_live_); null before the device has registered.
testDevice
BubblTestDevice?
In Sandbox, this device's approval as a test device; null in Production.
started
bool
Bubbl.start (or startWithCredential) has been called and Bubbl is running.
sdkVersion
String
The native SDK's version.
sdkSupported
bool
false when the workspace requires a newer SDK.
registered
bool
This install has its credential with Bubbl.
installId
String?
This install's id with Bubbl, once it has one.
credentialRejected
bool
The server refused the credential Bubbl was started with, and Bubbl stopped.
active
bool
Running: started, consent allows it, not paused by the server, supported.
pausedUntil
int?
Unix seconds until which the server paused Bubbl, if it has.
consentRequired
bool
Started with BubblOptions.requireConsent.
consent
bool?
The answer given to setConsent; null if none yet.
locationEnabled
bool
Bubbl may use location (setLocationEnabled).
permissions
BubblPermissionStatus?
Where the device stands on the permissions Bubbl uses; null before start.
hasPushToken
bool
Bubbl has a push token for this device.
geofences
int
How many geofences Bubbl is watching.
queuedEvents
int
Events waiting to be sent.
lastError
String?
The last error Bubbl couldn't fix itself; null if none.
backgroundLocation
bool
Geofences work with the app closed ("Always"); otherwise only while it's open.
transitionsDroppedWhileLocked
int
Geofence entries and exits lost before the first unlock after a reboot. Always 0 on Android.
backgroundRestricted
bool?
Android only; null on iOS. The user restricted the app's background activity.
batteryOptimized
bool?
Android only; null on iOS. Battery optimisation applies (background work may be delayed in Doze).
backgroundRefreshAvailable
bool?
iOS only; null on Android. Background App Refresh is on for the app.
lowPowerMode
bool?
iOS only; null on Android. Low Power Mode is on.
osWatchesGeofences
bool?
iOS only; null on Android. iOS watches the geofences; otherwise they're checked from location changes.

type BubblDiagnostics: the fields both platforms have, then each platform's own, which are null on the other platform. Where there's no native module (web, Expo Go, Jest, a build from before the install), diagnostics() still resolves: started, active and supported are false, and lastError says why.

started
boolean
start (or startWithCredential) has been called and Bubbl is running.
sdkVersion
string
The native SDK's version.
supported
boolean
Bubbl works on this device (iOS 17, Android 8.1 and later), as Bubbl.isSupported.
sdkSupported
boolean
false when the workspace requires a newer SDK.
registered
boolean
This install has its credential with Bubbl.
installId
string | null
The install id Bubbl keeps; null before there is one.
active
boolean
Running: started, consent allows it, not paused by the server, supported.
pausedUntil
number | null
Unix seconds until which the server paused Bubbl, if it has.
consentRequired
boolean
Started with requireConsent.
consent
boolean | null
The answer given to setConsent; null if none yet.
locationEnabled
boolean
Bubbl may use location (setLocationEnabled).
permissions
BubblPermissionStatus | null
Where the device stands on the permissions Bubbl uses.
hasPushToken
boolean
Bubbl has a push token for this device.
geofences
number
How many geofences Bubbl is watching.
queuedEvents
number
Events waiting to be sent.
lastError
string | null
The last error Bubbl logged; null if none.
credentialRejected
boolean
Started with a credential the server refused.
environment
'sandbox' | 'production' | null
The workspace the key belongs to; null before the device has registered.
testDevice
BubblTestDevice | null
In Sandbox, where this device stands as a test device; null in Production.
backgroundLocation
boolean
Geofences work with the app closed ("Always" location).
transitionsDroppedWhileLocked
number
Geofence events lost before the first unlock after a reboot. Always 0 on Android.
backgroundRestricted
boolean | null
Android only; null on iOS. The user restricted the app's background activity.
batteryOptimized
boolean | null
Android only; null on iOS. Battery optimisation applies (background work may wait in Doze).
backgroundRefreshAvailable
boolean | null
iOS only; null on Android. Background App Refresh is on for the app.
lowPowerMode
boolean | null
iOS only; null on Android. Low Power Mode is on.
osWatchesGeofences
boolean | null
iOS only; null on Android. The OS watches the geofences; otherwise they're checked from location changes.

Test device#

A Sandbox install's approval as a test device, in testDevice. It's "pending" until someone approves it (in the dashboard with code, or with Bubbl.registerTestDevice), then "approved".

data class Bubbl.TestDevice(status, code).

status
String
"pending" or "approved".
code
String?
While pending, the code to approve this device with in the dashboard.

public struct Bubbl.Diagnostics.TestDevice: Sendable, Equatable. Unused for 30 days, or removed in the dashboard, a test device is pending again.

status
String
"pending" or "approved".
code
String?
While pending, the short code the dashboard lists this device under (for example K7Q-2MX).

class BubblTestDevice, with a const constructor, a fromMap factory and a readable toString().

status
String
"pending" or "approved".
code
String?
While pending, the short code the dashboard lists this device under (for example K7Q-2MX).

type BubblTestDevice.

status
'pending' | 'approved'
Where the device stands.
code
string (optional)
While pending, the short code the dashboard lists this device under (for example K7Q-2MX). Left out when there's none.