stntz / Xamarin.ZoomBinding

Zoom Mobile SDK Binding for Xamarin Android and iOS(device only)
15 stars 13 forks source link

How do I override the back button? #13

Closed patkozlowski closed 4 years ago

patkozlowski commented 4 years ago

When joining the meeting how do I override the back button? It just exits or minimizes the app currently. Since the meeting activity isn't exposed from what I can see, I can't override the back button.

Thanks

stntz commented 4 years ago

Hi @patkozlowski , are you using the nuget package.. it might need an update to support overriding the metting activity. if you clone the repo, you should have the activity exposed. I will update the nuget package soon.

patkozlowski commented 4 years ago

I cloned the repo, and indeed it does have the meeting activity exposed. I have not tried with the nuget package. I followed this from the zoom forum, and it works for anyone that wants to do so, of course converting this to Xamarin:

Create your own activity, for example, MyMeetingActivity In config.xml, add the following:

us.zoom.sdksample.MyMeetingActivity

Declare the Activity in your AndroidManifest.xml In your MyMeetingActivity class, extends MeetingActivity public class MyMeetingActivity: MeetingActivity { ... } Override the onBackPressed method: @Override public void onBackPressed() { onClickLeave(); ... } If you would like define other actions other than calling the leave meeting dialog, you can do whatever you prefer in this callback.

stntz commented 4 years ago

Thanks @patkozlowski I believe I have that working in a personal project that I use this for. Nuget update should be this weekend.

patkozlowski commented 4 years ago

@stntz thanks for being so responsive, this is a huge undertaking that gives the xamarin community great value. I've noticed a lot of my clients wanting something like this, and is a big win for all of us. Thanks for this binding!!!