Use remote controls
The code on this page only works with the custom UI.
To start using remote control services, get an
InMeetingRemoteController instance from InMeetingService.
public MeetingRemoteControlHelper(CustomShareView shareView) {
this.customShareView = shareView;
mInMeetingRemoteController = ZoomSDK.getInstance().getInMeetingService().getInMeetingRemoteController();
mInMeetingRemoteController.addListener(this);
mInMeetingService = ZoomSDK.getInstance().getInMeetingService();
}
Action
Start remote controlling by calling startRemoteControl method.
@Override
public void remoteControlStarted(long userId) {
long myUserId = mInMeetingService.getMyUserID();
boolean isMe = userId == myUserId;
boolean hasPriv = mInMeetingRemoteController.hasRemoteControlPrivilegeWithUserId(myUserId);
boolean isRc = mInMeetingRemoteController.isRemoteController();
Log.d(TAG, "remoteControlStarted userId:" + userId + " myUserId:" + myUserId + " hasPriv:" + hasPriv + " isRc:" + isRc);
if (isMe) {
if (isRc) {
mInMeetingRemoteController.startRemoteControl();
}
} else {
customShareView.enableRC(hasPriv, isRc);
}
}
Listeners
Overriding these methods lets you to monitor the events while remote controlling.
@Override
public void onUserGetRemoteControlPrivilege(long userId) {
long myUserId = mInMeetingService.getMyUserID();
boolean isMe = userId == myUserId;
boolean hasPriv = mInMeetingRemoteController.hasRemoteControlPrivilegeWithUserId(myUserId);
boolean isRc = mInMeetingRemoteController.isRemoteController();
if (isMe) {
customShareView.enableRC(hasPriv, isRc);
}
Log.d(TAG, "onUserGetRemoteControlPrivilege userId:" + userId + " myUserId:" + myUserId + " hasPriv:" + hasPriv + " isRc:" + isRc);
}
public void onDestroy() {
if (null != mInMeetingRemoteController) {
mInMeetingRemoteController.removeListener(this);
}
}