onMeetingStatusChanged - always on MEETING_STATUS_CONNECTING

Description
I would like to get the meetingNo on onMeetingStatusChanged and send to another android app, but the meetingStatus only show MEETING_STATUS_CONNECTING, even when I am in the meeting. I think the meetingNo can only get when the meetingStatus is on METTING_STATUS_INMEETING, right?

Which version?
v4.6.15086.0209

To Reproduce(If applicable)
meetingService = zoomSDK.getMeetingService();
meetingService.addListener(this);
instantMeetingOptions = new InstantMeetingOptions();
inMeetingService = zoomSDK.getInMeetingService();
int ret = meetingService.startInstantMeeting(this, instantMeetingOptions);

Screenshots

Smartphone (please complete the following information):

  • Device: SAMSUNG GT-N7105
  • OS: Android
  • Version Android 7.1.2

Additional context
Add any other context about the problem here.

Hi johntyty2,

Thanks for using Zoom SDK. May I ask what is the location of this meeting? Is this reproducible with our demo app?

Thanks!

Hi,

what do you mean the location of meeting?

Is this reproducible with our demo app?
I’m not sure, because I didn’t try the demo app. :sweat_smile:

Below is my implementation, hope it can help:
public class MainActivity extends AppCompatActivity implements Constants,
ZoomSDKInitializeListener,
MeetingServiceListener,
ZoomSDKAuthenticationListener {

private static final String TAG = MainActivity.class.getSimpleName();
MeetingService meetingService;
InMeetingService inMeetingService;
ZoomSDK zoomSDK;
InstantMeetingOptions instantMeetingOptions;

private EditText emailEdt;
private EditText passwordEdt;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    emailEdt = findViewById(R.id.email);
    passwordEdt = findViewById(R.id.password);

    zoomSDK = ZoomSDK.getInstance();
    zoomSDK.initialize(this, APP_KEY, APP_SECRET, this);
}

@Override
protected void onStart() {
    super.onStart();
    zoomSDK.addAuthenticationListener(this);
}

@Override
protected void onStop() {
    super.onStop();
    meetingService.removeListener(this);
    zoomSDK.removeAuthenticationListener(this);
}

@Override
protected void onDestroy() {
    super.onDestroy();
    meetingService.leaveCurrentMeeting(true);
}

public void login(View view) {
    if (!zoomSDK.isInitialized()) {
        Toast.makeText(this, "ZoomSDK has not been initialized successfully", Toast.LENGTH_LONG).show();
        return;
    }

    String email = emailEdt.getText().toString();
    String password = passwordEdt.getText().toString();
    if (zoomSDK.loginWithZoom(email, password) != ZoomApiError.ZOOM_API_ERROR_SUCCESS) {
        Toast.makeText(this, "ZoomSDK has not been logged in successfully", Toast.LENGTH_LONG).show();
    }
}

public void startMeeting(View view) {
    if (zoomSDK.isLoggedIn()) {
        meetingService = zoomSDK.getMeetingService();
        meetingService.addListener(this);
        instantMeetingOptions = new InstantMeetingOptions();
        inMeetingService = zoomSDK.getInMeetingService();
        int ret = meetingService.startInstantMeeting(this, instantMeetingOptions);

        Log.d(TAG, String.format("[startMeeting] result of startInstantMeeting: %d", ret));
    } else {
        Toast.makeText(this, "Please Login First", Toast.LENGTH_LONG).show();
    }
}

@Override
public void onMeetingStatusChanged(MeetingStatus meetingStatus, int errorCode, int internalErrorCode) {
    Log.d(TAG, String.format("[onMeetingStatusChanged] meetingStatus: %s", meetingStatus.toString()));
    Log.d(TAG, String.format("[onMeetingStatusChanged] getCurrentMeetingID: %s", inMeetingService.getCurrentMeetingID()));
    Log.d(TAG, String.format("[onMeetingStatusChanged] MeetingNumber: %d", inMeetingService.getCurrentMeetingNumber()));
    Log.d(TAG, String.format("[onMeetingStatusChanged] MeetingTopic: %s", inMeetingService.getCurrentMeetingTopic()));
    Log.d(TAG, String.format("[onMeetingStatusChanged] MeetingUrl: %s", inMeetingService.getCurrentMeetingUrl()));
}

@Override
public void onZoomSDKLoginResult(long result) {
    if (result == ZoomAuthenticationError.ZOOM_AUTH_ERROR_SUCCESS) {
        Toast.makeText(this, "[onZoomSDKLoginResult] Login success", Toast.LENGTH_SHORT).show();
    } else {
        Toast.makeText(this, "[onZoomSDKLoginResult] Login failed result code = " + result, Toast.LENGTH_SHORT).show();
    }
}

@Override
public void onZoomSDKLogoutResult(long l) {

}

@Override
public void onZoomIdentityExpired() {

}

@Override
public void onZoomSDKInitializeResult(int errorCode, int internalErrorCode) {
    Log.d(TAG, String.format("[onZoomSDKInitializeResult] errorCode: %d, internalErrorCode: %d", errorCode, internalErrorCode));
    if (errorCode == ZoomAuthenticationError.ZOOM_AUTH_ERROR_SUCCESS) {
        zoomSDK.tryAutoLoginZoom();
    }
}

@Override
public void onZoomAuthIdentityExpired() {

}

public void logout(View view) {
    zoomSDK.logoutZoom();
}

}

Hi,
I just test to use joinMeeting, and it works perfect. However, I need to use startInstantMeeting.
Please help. :cry:

here’s the code for join meeting:

public class MainActivity extends AppCompatActivity implements
Constants,
ZoomSDKInitializeListener,
MeetingServiceListener,
ZoomSDKAuthenticationListener {

private static final String TAG = MainActivity.class.getSimpleName();
private EditText meetingNumberEt;
private MeetingService meetingService;
private InMeetingService inMeetingService;

@Override
protected void onDestroy() {
    super.onDestroy();
    meetingService.removeListener(this);
}

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    meetingNumberEt = findViewById(R.id.meetingNumber);

    ZoomSDK zoomSDK = ZoomSDK.getInstance();
    if(savedInstanceState == null) {
        zoomSDK.initialize(this, APP_KEY, APP_SECRET, this);
    }
}

@Override
public void onMeetingStatusChanged(MeetingStatus meetingStatus, int i, int i1) {
    Log.d(TAG, String.format("[onMeetingStatusChanged] meetingStatus: %s", meetingStatus.toString()));
    Log.d(TAG, String.format("[onMeetingStatusChanged] getCurrentMeetingID: %s", inMeetingService.getCurrentMeetingID()));
    Log.d(TAG, String.format("[onMeetingStatusChanged] MeetingNumber: %d", inMeetingService.getCurrentMeetingNumber()));
    Log.d(TAG, String.format("[onMeetingStatusChanged] MeetingTopic: %s", inMeetingService.getCurrentMeetingTopic()));
    Log.d(TAG, String.format("[onMeetingStatusChanged] MeetingUrl: %s", inMeetingService.getCurrentMeetingUrl()));
}

@Override
public void onZoomSDKLoginResult(long l) {

}

@Override
public void onZoomSDKLogoutResult(long l) {

}

@Override
public void onZoomIdentityExpired() {

}

@Override
public void onZoomSDKInitializeResult(int i, int i1) {
    Log.d(TAG, String.format("onZoomSDKInitializeResult: %d, %d", i, i1));
}

@Override
public void onZoomAuthIdentityExpired() {

}

public void joinMeeting(View view) {
    String meetingNo = meetingNumberEt.getText().toString().trim();
    if (meetingNo.length() == 0) {
        Toast.makeText(this, "You need to enter a meeting number/ vanity id which you want to join.", Toast.LENGTH_LONG).show();
        return;
    }

    ZoomSDK zoomSDK = ZoomSDK.getInstance();
    if(!zoomSDK.isInitialized()) {
        Toast.makeText(this, "ZoomSDK has not been initialized successfully", Toast.LENGTH_LONG).show();
        return;
    }

    meetingService = zoomSDK.getMeetingService();
    JoinMeetingOptions opts = new JoinMeetingOptions();

    JoinMeetingParams params = new JoinMeetingParams();
    params.displayName = "Guset";
    params.meetingNo = meetingNo;

    inMeetingService = zoomSDK.getInMeetingService();

    meetingService.addListener(this);
    meetingService.joinMeetingWithParams(this, params, opts);
}

}

Hi johntyty2,

Thanks for the reply and the code snippet. Regarding the location of the meeting, is the meeting host and participant locate in China?

Thanks!

Hi Carson_Chen,

The domain I used is zoom.us.
the meeting host and participant locale in Hong Kong.


this is what I want to get after startInstantMeeting, however I can only get it from joinMeetingWithParams.
Please help. :cry:

擷取
UPDATE!!!
I found the status changed indeed ( use meetingService.getMeetingStatus to get), but the onMeetingStatusChanged method didn’t called.

Hi johntyty2,

Thanks for the reply. Based on your code snippet and the screenshots, it looks like everything is working now. I can see the logging output written in onMeetingStatusChanged is being printed out, which is expected.

Let me know if any other questions. Happy Zooming!