startSDKAndroid method

  1. @override
Future<void> startSDKAndroid(
  1. String token
)
override

Starts the Grouplink SDK specifically for Android with the provided token. This method is used to initialize the SDK on Android devices. It uses the method channel to invoke the native Android SDK method.

Implementation

@override
Future<void> startSDKAndroid(String token) async {
  if (Platform.isAndroid) {
    try {
      methodChannel.invokeMethod(
        "registerGrouplink",
        {"token": token},
      );
    } on PlatformException catch (e) {
      log("Error registerGrouplink: ${e.message}");
      rethrow;
    }
  }
}