Wise App
  • Wise API Integration
    • Getting Started with Wise APIs
    • API Authentication
    • API Endpoints
    • SSO Integration
    • Webhooks Integration
      • Webhook Retry Mechanism
      • Webhook Event Samples
        • Participant Joined Meeting Event
        • Sharing Stared In Meeting Event
        • Participant Left Meeting Event
        • Sharing Ended In Meeting Event
        • Meeting Started Event
        • Meeting Ended Event
        • Recording Completed Event
        • Certificate Issued Event
        • Attendance Computed Event
        • Student Added To Classroom Event
        • Teacher Added To Classroom Event
        • Student Removed From Classroom Event
        • Teacher Removed From Classroom Event
        • Student Suspension Updated Event
        • Fee Payment Completed Event
        • Fee Invoice Charged Event
        • Sessions Created Event
        • Sessions Updated Event
        • Sessions Deleted Event
    • Rate Limits and Usage Quotas
    • Common Errors
  • Wise Data Storage Policy
  • Wise Android & IOS SDKs
    • Wise Android SDK (Kotlin)
    • Wise Android SDK (Java)
    • Wise Flutter SDK
    • Wise Flutter SDK - iOS Integration
  • Third Party Integrations
    • Custom Payment Gateway Integration
      • Razorpay Payments
      • Stripe Payments
    • AWS S3 storage
    • Custom Email
Powered by GitBook
On this page
  • 1. Wise Flutter Package
  • 2. Android Integration
  • 3. iOS Integration
  • 4. SDK Initialisation
  • 5. Joining a meeting
  • 6. Login using SSO Token
  • 7. Meeting listeners
  • 8. Example
  • 9. Error Codes
  • 10. Proguard Rules
  1. Wise Android & IOS SDKs

Wise Flutter SDK

PreviousWise Android SDK (Java)NextWise Flutter SDK - iOS Integration

Last updated 6 months ago

Send an email to info@wiseapp.live to get your VENDOR_ID and NAMESPACE to be used in the Android Integration steps below

1. Wise Flutter Package

Add package to your pubspec.yaml and execute flutter pub get command to install the package.

dependencies:
  wisesdk: 0.1.8

Package home page:

2. Android Integration

Prerequisites

  • Project specifications:

    • Gradle 8.6

    • Kotlin Extension: 1.9.20

    • Minimum API: 24

    • Compile API: 34

    • Recommended target API: 34

  1. Open your_project_folder/adroid/build.gradle and add maven and jcenter repositories to allprojects

allprojects {
    repositories {
        google()
        mavenCentral()

				// Wise repository
        maven {
            url "<https://wise-maven.s3.ap-south-1.amazonaws.com/android/releases>"
        }

        jcenter() // Required for zoom SDK
    }
}
  1. Move mobilertc folders into flutter_project_folder/android folder.

  2. Open android/settings.gradle and inlcude mobilertc and commonlib apps.

include ":app"
include ":mobilertc"

3. iOS Integration

4. SDK Initialisation

In order to use the Wise SDK, it should be initialised first.

  • Set your Vendor ID and Namespace

  • Set Lens icon (Optional)

  • Enable / Disable screen capture (Optional)

class _MyAppState extends State<MyApp> {
  final _wiseSdk = Wisesdk();

  // channel name must by `wisesdk`
  final wiseChannelName = 'wisesdk';

  @override
  void initState() {
    super.initState();
    initPlatformState();

    final methodChannel = MethodChannel(wiseChannelName);
    methodChannel.setMethodCallHandler(_wiseSDKMeetingListener);
  }

  Future<void> initPlatformState() async {

    // Platform messages may fail, so we use a try/catch PlatformException.
    // We also handle the message potentially returning null.
    try {
      await _wiseSdk.initSdk("650d614xxxxxxxxb9988934f", "yellowmonkey");

      if (Platform.isIOS) {
        // set screen share group id and bundle id
        _wiseSdk.enableScreenShare("group.live.wise.wisesdkExample", "live.wise.wisesdkExample.screen");
      }

      // enable / disable screen capture (works on Android only)
      _wiseSdk.disableScreenCapture(false);
	}
}

5. Joining a meeting

5.1 Join Meeting by Classroom Public ID

      // join meeting by classroom public ID
      // This doesn't need Authentication or SSO Login
      final joinParams = {
        "classroomPublicId": "65953bb0aa30204e26b047982b51053399",
        "userName": "John",
        "userId": "userId_101001"
      };

			if (await _wiseSdk.isMeetingInProgress()) {
        // return to in progress meeting
        _wiseSdk.gotoMeeting();
      } else {
        _wiseSdk.joinMeeting(joinParams);
      }

5.2 Join Meeting by Classroom ID

  // join meeting by classroom number
  // SSO Login or Auth token is needed to do this
	final joinParams = {
        "classroomId": "65953bb0aa3f4e26b047982b",
        "disableScreenCapture": true
      };

	if (await _wiseSdk.isMeetingInProgress()) {
        // return to in progress meeting
        _wiseSdk.gotoMeeting();
  } else {
        _wiseSdk.joinMeeting(joinParams);
  }

6. Login using SSO Token

To login into SDK using SSO Token, pass tho SSO token to loginUsingSSOToken() method.

await _wiseSdk.loginUsingSSOToken("YOUR_SSO_TOKEN");

To logout from SSO, call logoutSSO() method.

_wiseSdk.logoutSSO(); 

7. Meeting listeners

WiseSDKMeetingListener provides necessary callbacks to listen to meeting status.

Future<void> _wiseSDKMeetingListener(MethodCall call) async {
    switch (call.method) {
      case "onInitialised":
        {
          debugPrint("onInitialised");
        }
      case "onMeetingConnecting":
        {
          debugPrint("onMeetingConnecting");
        }

      case "onMeetingEnded":
        {
          final userId = call.arguments;
          debugPrint("onMeetingEnded userId: $userId");
        }

      case "onMeetingEndedByHost":
        {
          debugPrint("onMeetingEndedByHost");
        }

      case "onMeetingEndedWithError":
        {
          final data = call.arguments;
          int errorCode = data["errorCode"];
          int internalErrorCode = data["internalErrorCode"];
          String message = data["message"];

          debugPrint(
              "onMeetingEndedWithError $errorCode, $internalErrorCode, $message");
        }

      case "onMeetingNeedPasswordOrDisplayName":
        {
          debugPrint("onMeetingNeedPasswordOrDisplayName");
        }

      case "onMeetingNotStartedByHostError":
        {
          debugPrint("onMeetingNotStartedByHostError");
        }

      case "onMeetingStarted":
        {
          final isMeetingStarted = call.arguments;
          debugPrint(
              "onMeetingStarted isMeetingStarted: $isMeetingStarted");
        }

      case "onSDKError":
        {
          final data = call.arguments;
          int wiseErrorCode = data["wiseErrorCode"];
          int errorCode = data["errorCode"];
          int internalErrorCode = data["internalErrorCode"];

          debugPrint(
              "onSDKError $wiseErrorCode, $errorCode, $internalErrorCode");
        }

      case "onVendorIdError":
        {
          debugPrint("onVendorIdError");
        }
    }
  }

8. Example

9. Error Codes

In case of an error, onSDKError() will be triggered with an error code.

Error Code

Description

1

JWT Token error has occurred. This can be due to invalid vendor Id.

2

Zoom SDK failed to initialise.

3

Wise SDK failed to communicate with it’s servers.

4

Error fetching the SDK config

10. Proguard Rules

Add the below proguard rules to your android/proguard-rules.pro when minification is enabled.

# zoom sdk
-keep class  us.zoom.**{*;}
-keep class  com.zipow.**{*;}
-keep class  us.zipow.**{*;}
-keep class  org.webrtc.**{*;}
-keep class  us.google.protobuf.**{*;}
-keep class  com.google.crypto.tink.**{*;}
-keep class  androidx.security.crypto.**{*;}

# wise sdk
-keep class com.wise.sdk.data.** { *; }
-keep class com.wise.sdk.core.** { *; }
-keep class com.wise.sdk.network.result.** { *; }

Download and unzip the file. After unzipping the downloaded file, you will find mobilertc inside.

Follow the iOS integration guide .

You can use joinMeeting() to join a meeting. The required {token} can be found in the {public link} of a classroom. To get the {public link} you should call /user/v2/classes/:classId API ()

You can refer the full example .

wisesdk
https://pub.dev/packages/wisesdk
Zoom SDK
Download zoom-sdk-android-6.1.10.23878
here
documentation
here