Zoom SDK initialization failed with error code: 1, internal error code: 0…
String stJwtToken=“TsvdFPs3rupMJw_EelGQlKZO1fIoUYrBw”;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initializeSdk(this);
initViews();
}
/**
* Initialize the SDK with your credentials. This is required before accessing any of the
* SDK's meeting-related functionality.
*/
public void initializeSdk(MainActivity context) {
ZoomSDK sdk = ZoomSDK.getInstance();
// TODO: Do not use hard-coded values for your key/secret in your app in production!
ZoomSDKInitParams params = new ZoomSDKInitParams();
params.jwtToken = stJwtToken;
params.domain = "zoom.us";
params.enableLog = true;
// TODO: Add functionality to this listener (e.g. logs for debugging)
ZoomSDKInitializeListener listener = new ZoomSDKInitializeListener() {
/**
* @param errorCode {@link us.zoom.sdk.ZoomError#ZOOM_ERROR_SUCCESS} if the SDK has been initialized successfully.
*/
@Override
public void onZoomSDKInitializeResult(int errorCode, int internalErrorCode) {
if (errorCode == ZoomError.ZOOM_ERROR_SUCCESS) {
Log.d("ZoomSDK", "Zoom SDK initialized successfully");
} else {
Log.e("ZoomSDK", "Zoom SDK initialization failed with error code: " + errorCode + ", internal error code: " + internalErrorCode);
// Handle the initialization failure, such as showing an error message to the user
}
// Print all logs
Log.d("ZoomSDK", "Initialization result - errorCode: " + errorCode + ", internalErrorCode: " + internalErrorCode);
}
@Override
public void onZoomAuthIdentityExpired() {
}
};
sdk.initialize(context, listener, params);
}