Diagnostics
struct · Swiftdata class · Kotlintype · TypeScriptclass · DartWhere 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.
start has been called and Bubbl is running on this device.false when the workspace requires a newer SDK.true straight away when started with a device credential.null before start.requireConsent.setConsent; null if none yet.setLocationEnabled).permissions.status().null if none.false. Geofences work with the app closed ("Allow all the time"); otherwise only while it's open.0. Always 0 on Android, which delivers geofence events once the phone is unlocked after a reboot.false. Android only. The user restricted the app's background activity in settings, so Bubbl can't run with the app closed.true. Android only. Battery optimisation applies (the default), so background work may be delayed in Doze.false. The server refused the credential Bubbl was started with; Bubbl has stopped until it's started with a new one.true. This device runs Bubbl: Android 8.1 (API 27) or newer, as Bubbl.isSupported."sandbox" or "production", once the server has said; null before, or from a server that predates Sandbox.null in Production.public struct Bubbl.Diagnostics: Sendable, Equatable. It has no public initializer.
start has been called and Bubbl is running on this device.Bubbl.isSupported.false when the workspace requires a newer SDK.true straight away when started with a device credential.nil before there is one.requireConsent.setConsent; nil if none yet.setLocationEnabled).permissions.status().nil if none."sandbox" (a pk_test_ key) or "production" (pk_live_); nil before the device has registered, or from a server that predates Sandbox.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.
Bubbl.isSupported."sandbox" (a pk_test_ key) or "production" (pk_live_); null before the device has registered.null in Production.Bubbl.start (or startWithCredential) has been called and Bubbl is running.false when the workspace requires a newer SDK.BubblOptions.requireConsent.setConsent; null if none yet.setLocationEnabled).null before start.null if none.null on iOS. The user restricted the app's background activity.null on iOS. Battery optimisation applies (background work may be delayed in Doze).null on Android. Background App Refresh is on for the app.null on Android. Low Power Mode is on.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.
start (or startWithCredential) has been called and Bubbl is running.Bubbl.isSupported.false when the workspace requires a newer SDK.null before there is one.requireConsent.setConsent; null if none yet.setLocationEnabled).null if none.null before the device has registered.null in Production.null on iOS. The user restricted the app's background activity.null on iOS. Battery optimisation applies (background work may wait in Doze).null on Android. Background App Refresh is on for the app.null on Android. Low Power Mode is on.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).
"pending" or "approved".public struct Bubbl.Diagnostics.TestDevice: Sendable, Equatable. Unused for 30 days, or removed in the dashboard, a test device is pending again.
"pending" or "approved".K7Q-2MX).class BubblTestDevice, with a const constructor, a fromMap factory and a readable toString().
"pending" or "approved".K7Q-2MX).type BubblTestDevice.
K7Q-2MX). Left out when there's none.