aidlab_sdk 0.0.14 aidlab_sdk: ^0.0.14 copied to clipboard
Official Aidlab SDK for Flutter, for more information please visit https://www.aidlab.com/developer
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 #
- Set minimum sdk version to at least 25
minSdkVersion 25
- 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