How to mute user's audio?

,

Hi, I see there is a function named “setMuted(bool mute)” in
https://zoom.github.io/zoom-sdk-android/us/zoom/sdk/InMeetingUserInfo.AudioStatus.html#setMuted-boolean-

But I am not able to call this from my code ?

I am trying to call this like

ZoomSDK.getInstance().getInMeetingService().getMyUserInfo().getAudioStatus().setMuted(true);

but getInMeetingSerivce() is always returning null even if the meeting is on.

Hi, 

please take a look at the following API call :

public void muteAudio(boolean mute)

Best

Hi Wei Guo,
Thanks for the reply. This function is in MeetingActivity Class.
Can you help me with code snippet, to call this method from my Home Class.

This is my home class declaration

public class Home extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener , MeetingServiceListener, ZoomSDKInitializeListener,ConnectivityReceiver.ConnectivityReceiverListener {

}

Hi,

Please take a look at Sample code we provided.

Best

 

Hi Wei,

Which sample code ? Please be more specific. I have already taken 2 pro account and have build the Android App.

I have gone through sample example but Couldn’t find the exact solution.

 

Thanks

Hi,

sample is available at example2 we provided: https://github.com/zoom/zoom-sdk-android/blob/master/zoom-mobilertc-adt/example2/src/us/zoom/sdkexample2/MyMeetingActivity.java 

In your case, I think under declaration, you need extend MeetingActivity and you can write something like: 

| @Override |
|   | public void onMute(boolean mute) { |
|   | return muteAudio(mute); |
|   | } |

Best

Hi, 

Do you try to call mute audio method outside meeting process? You can only call Zoom’s inMeetingService in meeting process. 

Hi Wei,

Yes

When i extend my Home class from MeetingActivity, Its crashing on onDestroy method.

 

E/AndroidRuntime: FATAL EXCEPTION: main
Process: us.zoom.diyaayaad.zoomsample, PID: 6436
java.lang.UnsatisfiedLinkError: No implementation found for long com.zipow.videobox.confapp.ConfMgr.getShareObjHandle() (tried Java_com_zipow_videobox_confapp_ConfMgr_getShareObjHandle and Java_com_zipow_videobox_confapp_ConfMgr_getShareObjHandle__)
at com.zipow.videobox.confapp.ConfMgr.getShareObjHandle(Native Method)
at com.zipow.videobox.confapp.ConfMgr.getShareObj(ConfMgr.java:173)
at com.zipow.videobox.ConfActivityNormal.stopShareSession(ConfActivityNormal.java:6197)
at com.zipow.videobox.ConfActivityNormal.stopShare(ConfActivityNormal.java:6683)
at com.zipow.videobox.ConfActivityNormal.onDestroy(ConfActivityNormal.java:1158)
at android.app.Activity.performDestroy(Activity.java:6874)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1175)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4195)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4226)
at android.app.ActivityThread.-wrap6(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1534)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6123)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)

 

And, Yes I am calling

ZoomSDK.getInstance().getInMeetingService().getMyUserInfo().getAudioStatus().setMuted(true);

while the meeting is live. 

 

 

 

 

Hi,

I think this issue is because you forget to define the home activity inside meeting process. 

Please take a look at the following code sample.


Best