I installed the video sdk about a year ago. I delayed upgrading to the newest version of the sdk a few months ago because of the significant changes that were made in your sdk that would have required me to invest time to refactor my code. But up until about a month ago my app stil worked with the older sdk. I haven’t used the video meeting part of my app for about a month. But today when I attempted to use it, the initialization of the sdk failed with an error code of 7.
I spent some time reading up on the Zoom docs to see if anything on your backend changed that would prevent the older sdk from working. One thing I noticed was that the jwt token is suppose to include a role_type field but the documenation states that this is only for sdk versions 1.2.0 and newer. This is where things have started to get very confusing. First, I wasn’t even sure anymore what version my sdk even was. I also went to my Zoom project’s page and noticed that the current Android sdk version is v5.9.6.4777. There isn’t even a version 1.2.0 listed. I can hardly imagine that even within one year, the versions went from 1.x to 5.9. Please clarify why I’m seeing this.
I decided to download the v5.9.6.4777 sdk and run the app. In the past I did this with only minor issues getting the jwt token correct. I also made sure to add the role_type field to the jwt token. This is what my token looks like:
{
"alg": "HS256",
"typ": "JWT"
}
{
"app_key": "2VfZYxxxxxxxxx",
"exp": 1646337547,
"iat": 1646323147,
"role_type": 1,
"tpc": "oyW8n1EZriIOdP9f",
"user_identity": "SqEDUAMprS7vqz9P_",
"version": 1
}
I’ve used this format previously excluding the role_type and it worked, so there is really nothing wrong with this token. Using the sample app from the sdk, I get an error code of 1 (“Wrong usage of the interface”). I have no idea what the issue can be.
Another issue that contributes to this confusion is that I have two Zoom app types: jwt and sdk. I actually only use the jwt as my backend is responsible for generating the jwt tokens and forwarding to the Android app. However, it is very confusing from your documentation when it states to download the Android sdk which is only available under the “sdk” type. The “jwt” type does not have anything to download, yet under this project the api key and secret are defined. But under the “sdk” project, you refer to this as “sdk key” and “secret”. But the documentation for installing and running the sample app only use the jwt token. There is no mention in the documentation about using a “sdk key”. You need to provide better documentation on this. If the “sdk key” is suppose to be used somewhere, you need to indicate where and under what conditions. As mentioned, I was using the “api key” and secret up until now and that worked.
The following are my development settings:
Android Studio Android Studio Bumblebee | 2021.1.1 Patch 2
Device: Pixel 2 XL running Android 11
I also had to fix up your build.gradle files as the demo app would not compile.
Project’s build.gradle
buildscript {
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0'
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
Sample module’s build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion = 31
buildToolsVersion = "31.0.0"
defaultConfig {
applicationId "us.zoom.sdkexample"
minSdkVersion 21
targetSdkVersion 31
versionCode 1
versionName "1.0"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
// ndk {
// abiFilters "arm64-v8a"
// }
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}
dependencies {
//for demo
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation project(':commonlib')
implementation project(':mobilertc')
}
Note that I also upgraded to Java 11 and am using SDK 31 for Android (not 30 as your sample originally used)