100ms Flutter SDK Integration Guide

Installing our libraries

Add the hmssdk_flutter plugin in dependencies of pubspec.yaml

#pubspec.yaml dependencies: flutter: sdk: flutter hmssdk_flutter:

Setting up the library

Run following in command in terminal.

flutter pub get flutter build apk flutter build ios flutter run

Device Permissions

Android

Camera, Recording Audio and Internet permissions are required. Add them to your AndroidManifest.xml.

<uses-feature android:name="android.hardware.camera"/> <uses-feature android:name="android.hardware.camera.autofocus"/> <uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/> <uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

You will also need to request Camera and Record Audio permissions at runtime before you join a call or display a preview. Please follow Android Documentation for runtime permissions.

Update target Android version

Update the Android SDK version to 21 or later by navigating to the directory and updating the android/app/build.gradle file

defaultConfig{ minSdkVersion 21 … }

iOS

Add the entitlements for video, audio and network access to your Info.plist

<key>NSCameraUsageDescription</key> <string>Allow access to Camera to enable video calling.</string> <key>NSLocalNetworkUsageDescription</key> <string>Allow access to Camera to network to enable video calling.</string> <key>NSMicrophoneUsageDescription</key> <string>Allow access to Camera to mic to enable video calling.</string>

You will also need to request Camera and Record Audio permissions at runtime before you join a call or display a preview.

Debugging Tools

You can use Android Studio, VS Code & Xcode to develop application with 100ms.

Proguard configuration

Add this to your proguard-rules.pro

# 100ms proguard rules -keep class org.webrtc.** { *; } -keep class live.hms.video.** { *; }