Saltar al contenido principal
Version: 0.1.0

Protection Mode

Protection Mode is an additive runtime capability that arms a higher-resilience path for critical BLE and SOS handling. It does not change default SDK behavior when off.

What you should know

  • Protection Mode is off by default
  • The host app must arm it explicitly
  • Readiness can be evaluated before arming
  • Android has the most complete current path
  • iOS participates with the same Dart contract but may remain partial depending on runtime ownership support

Evaluate readiness before arming:

final readiness = await sdk.evaluateProtectionReadiness();

if (readiness.canEnterProtectionMode) {
await sdk.enterProtectionMode();
}

Available methods

MethodDescription
evaluateProtectionReadiness()Check if Protection Mode can be armed
enterProtectionMode(...)Arm Protection Mode
exitProtectionMode()Disarm Protection Mode
getProtectionStatus()Read current armed/degraded/off state
watchProtectionStatus()Stream status changes
getProtectionDiagnostics()Read reconnect, wake, and queue diagnostics
watchProtectionDiagnostics()Stream diagnostic changes
rehydrateProtectionState()Restore state after app restart
flushProtectionQueues()Flush pending native queues

Host app responsibilities

  • Declare native permissions and capabilities (see Permissions Checklist)
  • Own permission education UX
  • Decide when to arm and disarm Protection Mode
  • Render protection status and diagnostics meaningfully in your UI

Platform differences

For platform-specific setup and limitations, see: