Move mobilertc folders into your_project_folder/android folder.
Open android/settings.gradle and inlcude mobilertc and commonlib apps.
include ":app"include ":mobilertc"
3. iOS Integration
TBD
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_MyAppStateextendsState<MyApp> {final _wiseSdk =Wisesdk();// channel name must by `wisesdk`final wiseChannelName ='wisesdk';@overridevoidinitState() { 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");// enable / disable screen capture _wiseSdk.disableScreenCapture(false);// set Lens icon// Place a drawable in drawable-nodpi folder and provide the icon // name to setLensIcon() method _wiseSdk.setLensIcon("lens_demo"); }}
5. Joining a meeting
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 (documentation)
5.1 Join Meeting by Classroom Public ID
// join meeting by classroom public ID// This doesn't need Authentication or SSO Loginfinal 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 thisfinal 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.