EIXAM Connect SDK
partner docs

Public API

This page documents the recommended partner-facing SDK methods.

Deprecated and compatibility methods are intentionally omitted from the partner path. If you are migrating an older host app, use the full/internal docs for those surfaces.

Bootstrap

EixamConnectSdk.bootstrap(...)

Purpose:

Returns:

Most-used inputs:

Signed-session reminder:

final sdk = await EixamConnectSdk.bootstrap(
  const EixamBootstrapConfig(
    appId: 'partner-app',
    environment: EixamEnvironment.sandbox,
    initialSession: EixamSession.signed(
      appId: 'partner-app',
      externalUserId: 'partner-user-123',
      userHash: 'signed-session-hash',
    ),
  ),
);

final session = await sdk.getCurrentSession();
debugPrint('session user=${session?.externalUserId}');

Transport note:

Diagnostics

getOperationalDiagnostics()

Purpose:

Returns:

Common fields to inspect:

final diagnostics = await sdk.getOperationalDiagnostics();
debugPrint('mqtt=${diagnostics.connectionState.name}');
debugPrint('telTopic=${diagnostics.telemetryPublishTopic}');
debugPrint('lastDecision=${diagnostics.bridge.lastDecision}');
debugPrint('pendingSos=${diagnostics.bridge.pendingSos != null}');

watchOperationalDiagnostics()

Purpose:

Returns:

Common fields to inspect:

final sub = sdk.watchOperationalDiagnostics().listen((diagnostics) {
  debugPrint('mqtt=${diagnostics.connectionState.name}');
  debugPrint('bridge=${diagnostics.bridge.lastDecision}');
});

Device Lifecycle

connectDevice(...)

Purpose:

Returns:

Common fields to inspect:

final status = await sdk.connectDevice(pairingCode: '123456');
debugPrint('device=${status.deviceId}');
debugPrint('lifecycle=${status.lifecycleState.name}');
debugPrint('ready=${status.isReadyForSafety}');

getDeviceStatus()

Purpose:

Returns:

Common fields to inspect:

final status = await sdk.getDeviceStatus();
debugPrint('connected=${status.connected}');
debugPrint('lastSeen=${status.lastSeen}');
debugPrint('firmware=${status.firmwareVersion}');

deviceStatusStream

Purpose:

Returns:

Common fields to inspect:

final sub = sdk.deviceStatusStream.listen((status) {
  debugPrint('lifecycle=${status.lifecycleState.name}');
  debugPrint('connected=${status.connected}');
  debugPrint('battery=${status.approximateBatteryPercentage}');
});

getDeviceSosStatus()

Purpose:

Returns:

Common fields to inspect:

final status = await sdk.getDeviceSosStatus();
debugPrint('state=${status.state.name}');
debugPrint('event=${status.lastEvent}');
debugPrint('countdown=${status.countdownRemainingSeconds}');

SOS

triggerSos(...)

Purpose:

Returns:

Common fields to inspect:

final incident = await sdk.triggerSos(
  const SosTriggerPayload(
    message: 'Need assistance',
    triggerSource: 'button_ui',
  ),
);

debugPrint('incident=${incident.id}');
debugPrint('state=${incident.state.name}');

getCurrentSosIncident()

Purpose:

Returns:

Common fields to inspect:

final incident = await sdk.getCurrentSosIncident();
if (incident != null) {
  debugPrint('incident=${incident.id}');
  debugPrint('state=${incident.state.name}');
  debugPrint('hasPosition=${incident.positionSnapshot != null}');
}

getSosState()

Purpose:

Returns:

Common values to handle:

final state = await sdk.getSosState();
debugPrint('sosState=${state.name}');

Contacts

listEmergencyContacts()

Purpose:

Returns:

Common fields to inspect:

final contacts = await sdk.listEmergencyContacts();
for (final contact in contacts) {
  debugPrint('${contact.priority}: ${contact.name} ${contact.phone}');
}

createEmergencyContact(...)

Purpose:

Returns:

Common fields to inspect:

final contact = await sdk.createEmergencyContact(
  name: 'Mountain Rescue Desk',
  phone: '+34600000000',
  email: 'rescue@example.com',
  priority: 1,
);

debugPrint('contact=${contact.id}');
debugPrint('priority=${contact.priority}');

updateEmergencyContact(...)

Purpose:

Returns:

Common fields to inspect:

final current = (await sdk.listEmergencyContacts()).first;
final updated = await sdk.updateEmergencyContact(
  current.copyWith(name: 'Mountain Rescue 24/7'),
);

debugPrint('contact=${updated.id}');
debugPrint('name=${updated.name}');
debugPrint('updatedAt=${updated.updatedAt}');

Permissions

getPermissionState()

Purpose:

Returns:

Common fields to inspect:

final state = await sdk.getPermissionState();
debugPrint('location=${state.location.name}');
debugPrint('notifications=${state.notifications.name}');
debugPrint('bluetoothReady=${state.canUseBluetooth}');

Protection Mode

Background continuity is far stronger on Android when Protection Mode/native foreground service owns the BLE transport. Plain Flutter-owned BLE provides no guaranteed full background runtime.

getProtectionStatus()

Purpose:

Returns:

Common fields to inspect:

final status = await sdk.getProtectionStatus();
debugPrint('mode=${status.modeState.name}');
debugPrint('runtime=${status.runtimeState.name}');
debugPrint('owner=${status.bleOwner.name}');
debugPrint('protectedDevice=${status.protectedDeviceId}');

getProtectionDiagnostics()

Purpose:

Returns:

Common fields to inspect:

final diagnostics = await sdk.getProtectionDiagnostics();
debugPrint('wake=${diagnostics.lastWakeReason}');
debugPrint('reconnects=${diagnostics.reconnectAttemptCount}');
debugPrint('lastCommandRoute=${diagnostics.lastCommandRoute}');

Backend Device Registry

Paired-device sync logic

listRegisteredDevices()

Purpose:

Returns:

Common fields to inspect:

final devices = await sdk.listRegisteredDevices();
for (final device in devices) {
  debugPrint('${device.hardwareId} ${device.firmwareVersion}');
}

Omitted from the partner path

The partner site intentionally omits: