Diffrence in Sdk User and Login user?

hi i want to know the diffrence in sdk user and login user. how to participate as a login user 

API user can just start created meeting, login user can start instant meeting. And we have an interface “isLoggedIn” to check the user login or not.

I have added
implementation project(’:commonlib’)
implementation project(’:mobilertc’)
in my project.

Also i am able to successfully initialize sdk and also able to login.

After login when i start Instant Meeting, i am not able to see the interface. Can you please help me to solve this issue. Below is my code

ZoomSDK zoomSDK = ZoomSDK.getInstance();
zoomSDK.initialize(myContext, "zoom_api_key", "zoom_api_secret","zoom.us", new ZoomSDKInitializeListener() {
	@Override
	public void onZoomSDKInitializeResult(int errorCode, int internalErrorCode) {
		if (zoomSDK.isInitialized()) {
			Helper.showLog("ZoomSDK : Initialized Successfully");

			if ((zoomSDK.loginWithZoom("myemail@domain.com", "mypassword") == ZoomApiError.ZOOM_API_ERROR_SUCCESS)) {
				Helper.showLog("ZoomSDK : Login Success");

				final MeetingService meetingService = zoomSDK.getMeetingService();
				if(meetingService!=null){
					meetingService.addListener(new MeetingServiceListener() {
						@Override
						public void onMeetingStatusChanged(MeetingStatus meetingStatus, int i, int i1) {
							Helper.showLog("ZoomSDK : MeetingStatusChanged: "+meetingStatus+"\nMeetingID: "+meetingService.getCurrentRtcMeetingID()+"\nMeetingNumber: "+meetingService.getCurrentRtcMeetingNumber());
						}
					});
				} else {
					Helper.showLog("ZoomSDK : Meeting Service Null");
				}

				if(meetingService.getMeetingStatus() == MeetingStatus.MEETING_STATUS_IDLE){
					InstantMeetingOptions opts = new InstantMeetingOptions();
					opts.no_driving_mode = true;
					opts.no_invite = true;
					opts.no_meeting_end_message = true;
					opts.no_titlebar = true;
					opts.no_bottom_toolbar = true;
					opts.no_dial_in_via_phone = true;
					opts.no_dial_out_to_phone = true;
					opts.no_disconnect_audio = true;
					opts.no_share = true;
					int ret = meetingService.startInstantMeeting(RequestDetailsActivity.this, opts);
					Helper.showLog("ZoomSDK : InstantMeeting Start "+ret); //Here i am getting 0 as ret value
				} else {
					Helper.showLog("ZoomSDK : Meeting is not idle");
				}
			} else {
				Helper.showLog("ZoomSDK : Login Failed");
			}
		} else {
			Helper.showLog("ZoomSDK : Initialized Failed");
		}
	}
});

public static void showLog(String message) {
	Log.e("APPTAG", "" + message);
}

Waiting for your reply

Hi Jim,

Are you getting any error message? It looks like the Application Context that you use for SDK initialization is different from the one that you use for start instant meeting, what is your expected behavior here?

PS: Using the anonymous class is not the recommended way to implement Zoom SDK methods.

Thanks!

Hi Jim,

The reason why you were not able to start an instant meeting is because you were not successfully login when you called startInstantMeeting method.

The return value from zoomSDK.loginWithZoom only indicates whether the login request was success or not. To get the login result, you will need to implement onZoomSDKLoginResult method and identify whether the login was success or not:

@Override
	public void onZoomSDKLoginResult(long result) {
		if(result == ZoomAuthenticationError.ZOOM_AUTH_ERROR_SUCCESS) {
			Toast.makeText(this, "Login successfully", Toast.LENGTH_SHORT).show();
			Intent intent = new Intent(this, LoginUserStartJoinMeetingActivity.class);
			startActivity(intent);
			finish();
		} else {
			Toast.makeText(this, "Login failed result code = " + result, Toast.LENGTH_SHORT).show();
		}
	}

Let me know if you have any questions. Thanks!

@carson.zoom Than you for your valueable guide with your help i am able to start instant meeting.
Thank You Again

<string name="zoom_api_key">zoom_api_key</string>
<string name="zoom_api_secret">zoom_api_secret</string>

Implement Zoom Listeners

implements ZoomSDKInitializeListener, ZoomSDKAuthenticationListener, MeetingServiceListener 

Global Variable Declaration

private ZoomSDK zoomSDK;
private MeetingService meetingService;

On button click to start video call (Meeting)

zoomSDK = ZoomSDK.getInstance();
zoomSDK.initialize(context, getResources().getString(R.string.zoom_api_key), getResources().getString(R.string.zoom_api_secret), "zoom.us", this);

@Override
public void onZoomSDKInitializeResult(int errorCode, int internalErrorCode) {
	if (errorCode != ZoomError.ZOOM_ERROR_SUCCESS) {
		Helper.showLog("ZoomSDK : Failed to initialize Zoom SDK. Error: " + errorCode + ", internalErrorCode=" + internalErrorCode);
	} else {
		Helper.showLog("ZoomSDK : Initialized Successfully");
		zoomSDK.addAuthenticationListener(this);
		if (zoomSDK.tryAutoLoginZoom() == ZoomApiError.ZOOM_API_ERROR_SUCCESS) {
			Helper.showLog("ZoomSDK : Auto Login Success");
		} else {
			zoomSDK.loginWithZoom("email@domain.com", "password");
		}
	}
}

@Override
public void onZoomSDKLoginResult(long result) {
	if ((int) result == ZoomAuthenticationError.ZOOM_AUTH_ERROR_SUCCESS) {
		Helper.showLog("ZoomSDK : onZoomSDKLoginResult Login Success");
		initiateMeeting();
	} else {
		Helper.showLog("ZoomSDK : onZoomSDKLoginResult Login Failed Result Code: " + result);
	}
}

private void initiateMeeting() {
	meetingService = zoomSDK.getMeetingService();
	if (meetingService != null) {
		meetingService.addListener(this);
	}
	InstantMeetingOptions opts = new InstantMeetingOptions();
	int instantMeetingResponseCode = meetingService.startInstantMeeting(RequestDetailsActivity.this, opts);
	Helper.showLog("ZoomSDK : Instant Meeting: " + instantMeetingResponseCode);
}

@Override
public void onMeetingStatusChanged(MeetingStatus meetingStatus, int errorCode, int internalErrorCode) {
	Helper.showLog("ZoomSDK : MeetingStatusChanged: " + meetingStatus + "\nErrorCode: " + errorCode + "\nInternalErrorCode: " + internalErrorCode);

	if (meetingStatus == MeetingStatus.MEETING_STATUS_FAILED && errorCode == MeetingError.MEETING_ERROR_CLIENT_INCOMPATIBLE) {
		Helper.showLog("ZoomSDK : Version of ZoomSDK is too low!");
	} else if (meetingStatus == MeetingStatus.MEETING_STATUS_INMEETING) {
		Helper.showLog("ZoomSDK : MeetingNumber: " + meetingService.getCurrentRtcMeetingNumber() + "\nMeetingID: " + meetingService.getCurrentRtcMeetingID() + "\nMeetingStatus: " + meetingService.getMeetingStatus());
	} else if (meetingStatus == MeetingStatus.MEETING_STATUS_IDLE) {
		meetingService.removeListener(this);
		zoomSDK.logoutZoom();
	}
}

@Override
public void onZoomSDKLogoutResult(long l) {
	if ((int) result == ZoomAuthenticationError.ZOOM_AUTH_ERROR_SUCCESS) {
		Helper.showLog("ZoomSDK : Logout Successful");
	} else {
		Helper.showLog("ZoomSDK : Logout Failed Result Code: " + result);
	}
}

@Override
public void onZoomIdentityExpired() {
	zoomSDK.logoutZoom();
}

public static void showLog(String message) {
	Log.e("LOG_TAG", "" + message);
}

Log

E/LOG_TAG: ZoomSDK : Initialized Successfully
E/LOG_TAG: ZoomSDK : Auto Login Success
E/LOG_TAG: ZoomSDK : onZoomSDKLoginResult Login Success
E/LOG_TAG: ZoomSDK : Instant Meeting: 0
E/LOG_TAG: ZoomSDK : MeetingStatusChanged: MEETING_STATUS_CONNECTING
    ErrorCode: 0
    InternalErrorCode: 0
E/LOG_TAG: ZoomSDK : MeetingStatusChanged: MEETING_STATUS_INMEETING
    ErrorCode: 0
    InternalErrorCode: 0
    ZoomSDK : MeetingNumber: 958432459
    MeetingID: O7TzOL7RQ25nn2p1QnLc+Q==
    MeetingStatus: MEETING_STATUS_INMEETING
E/LOG_TAG: ZoomSDK : MeetingStatusChanged: MEETING_STATUS_DISCONNECTING
    ErrorCode: 0
    InternalErrorCode: 0
E/LOG_TAG: ZoomSDK : MeetingStatusChanged: MEETING_STATUS_IDLE
    ErrorCode: 0
    InternalErrorCode: 0
E/LOG_TAG: ZoomSDK : Logout Successful

Marking as solved.

-Tommy