EIXAM Connect SDK
partner docs

Quickstart

1. Add the dependency

For the planned 0.1.0 release, use the agreed EIXAM release tag when it is provided during release handoff.

dependencies:
  eixam_connect_flutter:
    git:
      url: https://github.com/eixam-tech/eixam-sdk-flutter
      ref: <agreed-0.1.0-release-tag>
      path: packages/eixam_connect_flutter

2. Import the package

import 'package:eixam_connect_flutter/eixam_connect_flutter.dart';

3. Bootstrap the SDK

Signed Session And Backend Responsibilities

HTTP auth remains:

MQTT auth now uses:

Standard environment

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',
    ),
  ),
);

Custom environment

final sdk = await EixamConnectSdk.bootstrap(
  const EixamBootstrapConfig(
    appId: 'partner-app',
    environment: EixamEnvironment.custom,
    customEndpoints: EixamCustomEndpoints(
      apiBaseUrl: 'https://partner-api.example.com',
      mqttUrl: 'ssl://partner-mqtt.example.com:8883',
    ),
  ),
);

The mqttUrl/websocketUrl field name stays stable for now even when the actual broker URI uses ssl://, tls://, tcp://, ws://, or wss:// depending on environment and transport support.

4. Request permissions explicitly from your host app

await sdk.requestLocationPermission();
await sdk.requestNotificationPermission();
await sdk.requestBluetoothPermission();

5. Use the SDK

Trigger SOS:

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

Connect a device:

await sdk.connectDevice(pairingCode: '123456');

Create an emergency contact:

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

Important notes