aidlab_sdk 0.0.5
aidlab_sdk: ^0.0.5 copied to clipboard

Aidlab sdk for Flutter

aidlab_sdk #

Warning: Early version(unstable), braking changes may occur.

Official Aidlab SDK for Flutter
For more information please visit: https://www.aidlab.com/developer
Platforms:

  • Android
  • iOS

Android configuration #

  1. Set minimum sdk version to at least 25
minSdkVersion 25
  1. Update manifest for Bluetooth communication
    <uses-permission android:name="android.permission.BLUETOOTH"/>
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>

Usage #

Warning: In order to connect with Aidlab, location permissions must be granted and Bluetooth must be enabled. This package doesn't handle permissions and bluetooth checks.

After Bluetooth is enabled, you can start scan:

    //sdkDelegate implements AildabSdkDelegate
    AidlabSdk.instance.aidlabSdkDelegate = sdkDelegate;
    AidlabSdk.instance.scanForDevices();

When Aidlab is detected, the onAidlabDetected function is called. In order to connect with Aidlab, choose the desired signals by adding them to the signals array:

@override
void onAidlabDetected(String address, int rssi) {
    final signals = [
        Signal.Ecg,
        Signal.HeartRate,
    ];
    //aidlabDelegate implements AidlabDelegate
    AidlabSdk.instance.connect(address, signals, aidlabDelegate);
}

For more information please visit: https://www.aidlab.com/developer

0
likes
90
pub points
26%
popularity

Aidlab sdk for Flutter

Homepage

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on aidlab_sdk