flutter_grouplink_sdk 2.1.10
flutter_grouplink_sdk: ^2.1.10 copied to clipboard
Flutter plugin GL
flutter_grouplink_sdk #
Group Link is an IoT and LaaS technology vendor providing innovative software-based network technology. Its unique approach enables a global Low-Power WAN with unprecedented coverage, leveraging on the connectivity spectrum of surrounding smartphones. GL devices are built under a proprietary, miniaturized and cost-effective design, with no maintenance requirements. Our protocol provides communication at low power between sensors, gateways, and data collection points. These features offer Group Link unique differentials and enable the massification of IoT in a broad range of business applications.
Getting Started #
To get started, you need to add flutter_grouplink_sdk to your project. Follow the steps below:
Open the terminal in your project root.
Run the following command:
$ flutter pub add flutter_grouplink_sdk
This command will add a line to your package's pubspec.yaml file and run an implicit flutter pub get.
The added line will look like this:
dependencies:
flutter_grouplink_sdk:
Now in your Dart code, you can use:
import 'package:flutter_grouplink_sdk/flutter_grouplink_sdk.dart';
Usage example #
Import flutter_grouplink_sdk
import 'package:flutter_grouplink_sdk/flutter_grouplink_sdk.dart';
Instantiate #
For a easier use, you can instantiate the Group Link SDK Plugin:
final _flutterGrouplinkSdkPlugin = GroupLinkSDKPlugin();
startSDK #
It's necessary to call the startSDK, startBluetooth and startLocation, so you can use the Group Link SDK Plugin.
In main.dart, after the runApp, or at the initState, call the following methods:
await _flutterGrouplinkSdkPlugin.startSDK( [TOKEN] );
await _flutterGrouplinkSdkPlugin.startBluetooth();
await _flutterGrouplinkSdkPlugin.startLocation();
The others methods also can be called after the startSDK, or at the initState.
Atention! To call every method, you will need to add await.
Full documentation #
Supported methods #
All the following methods are included in the Group Link SDK Plugin:
startSDK #
Usage: Start the Group Link SDK.
startSDKAndroid #
Usage: Start the Group Link SDK only in Android.
Deprecated. Recomend to use ```startSDK``.
startSDKiOS #
Usage: Start the Group Link SDK only in iOS.
Deprecated. Recomend to use ```startSDK``.
startLocation #
Usage: Start the location, and request it in app.
startBluetooth #
Usage: Start the bluetooth, and request it in app.
checkBluetooth #
Usage: Check the bluetooth status in app.
setNotificationToken #
Usage: Set notification by a argument required token.