Beispiel #1
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.Join);
     _layout = FindViewById(Resource.Id.joinLayout);
     CheckPermissions();
     FindViewById <EditText>(Resource.Id.channelName).Text   = AgoraSettings.Current.RoomName;
     FindViewById <EditText>(Resource.Id.encryptionKey).Text = AgoraSettings.Current.EncryptionPhrase;
     FindViewById <TextView>(Resource.Id.userName).Text      = RtmService.Instance.UserName;
     AgoraHandler = new AgoraQualityHandler(this);
     AgoraEngine  = RtcEngine.Create(BaseContext, AgoraTestConstants.AgoraAPI, AgoraHandler);
     AgoraEngine.EnableWebSdkInteroperability(true);
     AgoraEngine.EnableLastmileTest();
     FindViewById <TextView>(Resource.Id.agora_version_text).Text = string.Format(VersionFormat, RtcEngine.SdkVersion);
 }
Beispiel #2
0
 protected override void OnDestroy()
 {
     AgoraEngine.DisableLastmileTest();
     if (AgoraHandler != null)
     {
         AgoraHandler.Dispose();
         AgoraHandler = null;
     }
     if (AgoraEngine != null)
     {
         AgoraEngine.Dispose();
         AgoraEngine = null;
     }
     RtcEngine.Destroy();
     RtmService.Instance.Logout();
     base.OnDestroy();
 }