ailink 0.0.2 copy "ailink: ^0.0.2" to clipboard
ailink: ^0.0.2 copied to clipboard

AiLink broadcast scale data decryption and body fat algorithm Flutter library.

ailink #

AiLink broadcast scale data decryption and body fat algorithm Flutter library.

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Android #

1、Add in android/build.gradle file

allprojects {
    repositories {
        google()
        mavenCentral()
        //add
        maven { url 'https://jitpack.io' }
    }
}

2、Modify minSdkVersion in the android/app/build.gradle file

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.ailink_example"
    // You can update the following values to match your application needs.
    // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
    minSdkVersion 21 //flutter.minSdkVersion
    targetSdkVersion flutter.targetSdkVersion
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
}

3、To use the flutter_blue_plus library, you need to add the required permissions to android/app/src/main/AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

iOS #

1、When using the flutter_blue_plus library, you need to add the required permissions to ios/Runner/Info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>NSBluetoothAlwaysUsageDescription</key>
        <string>Need BLE permission</string>
        <key>NSBluetoothPeripheralUsageDescription</key>
        <string>Need BLE permission</string>
        <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
        <string>Need Location permission</string>
        <key>NSLocationAlwaysUsageDescription</key>
        <string>Need Location permission</string>
        <key>NSLocationWhenInUseUsageDescription</key>
        <string>Need Location permission</string>
    </dict>
</plist>

1、import AiLink plugin

import 'package:ailink/ailink.dart';

2、Plug-in initialization

final _ailinkPlugin = Ailink();

3、Decrypt data

_ailinkPlugin.decryptBroadcast(Uint8List)

4、Get body fat data

_ailinkPlugin.getBodyFatData(ParamBodyFatData().toJson())

For specific usage, please see example

1
likes
0
points
43
downloads

Publisher

unverified uploader

Weekly Downloads

AiLink broadcast scale data decryption and body fat algorithm Flutter library.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on ailink