Make sure your development environment meets the following requirements:
The ZegoWhiteboardView SDK needs to be used together with the ZEGO Express-Video SDK (with whiteboard support), so you also need to integrate the ZEGO Express-Video SDK (with whiteboard support) into your project. For the detailed integration instructions, see ZEGO Express-Video SDK - Integration.
The SDK package provided on the Whiteboard SDK downloads page already includes the ZEGO Express-Video SDK (with whiteboard support), so you don't need to download it separately.
If you have already integrated the ZEGO Express-Video SDK into your project before, you need to remove the old SDK and integrate the SDKs that you download from the Whiteboard SDK downloads page to avoid version mismatch between the ZEGO Express-Video SDK and the ZegoWhiteboardView SDK.
If you need the file sharing feature, also download the ZegoDocsView SDK.
Launch Android Studio, and in the Welcome to Android Studio window, click Create New Project.
If you have a project already opened, select File > New > New Project.
Select the project type Empty Activity.
In the Configure your project window, fill in the project name and the location to save the project.
Click Finish to complete the creation of the new project.
ZegoWhiteboardView SDK is built with AndroidX, so your project into which you are importing the SDK also needs to use AndroidX. If your project currently doesn't use AndroidX, you can migrate it to AndroidX as instructed in Migrating to AndroidX.
Download the latest version of the SDKs from the Whiteboard SDK downloads page.
Extract files from the downloaded SDK package and copy the zegowhiteboardview.aar
file to the app/libs/
folder in your project.
Add the following line in the dependencies
block of your app/build.gradle
file:
implementation fileTree(include: ['*.jar','*.aar'], dir:'libs')
If your project is a pure Java project, add the following line in the dependencies
block of your app/build.gradle
file as well:
// Add the following dependency if your project is a pure Java project.
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.30" // the jdk8 version can change over time.
Add the following permissions in your app/AndroidManifest.xml
file:
<!-- Permissions required by the SDK -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
The following table gives more detailed information about these permissions:
Permission | Description | Necessity | Why required |
---|---|---|---|
INTERNET | Allows applications to open network sockets. | Necessary | The fundamental features of the SDK can only be functional when connected to the Internet. |
ACCESS_WIFI_STATE | Allows applications to access information about Wi-Fi networks. | Necessary | The SDK performs different actions according to the network connection status. For example, when the network connection resumes after being interrupted, the SDK's internal state also returns to the point just before the network disconnection. |
ACCESS_NETWORK_STATE | Allows applications to access information about networks. | Necessary | The SDK performs different actions according to the network connection status. For example, when the network connection resumes after being interrupted, the SDK's internal state also returns to the point just before the network disconnection. |
WRITE_EXTERNAL_STORAGE | Allows an application to write to external storage. | Necessary | If you need to use a media player or sound player to load media resource files in Android external storage, you need to apply for this permission, otherwise the SDK cannot load the resources. |
READ_EXTERNAL_STORAGE | Allows an application to read from external storage. | Necessary | SDK needs to save logs and related configuration files to the built-in SD card. |
Add the following line to your proguard-rules.pro
file to prevent the public class names of the SDK from being obfuscated.
-keep class im.zego.zegowhiteboard.**{*;}