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; 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); }
protected override void OnDestroy() { if (AgoraHandler != null) { AgoraHandler.Dispose(); AgoraHandler = null; } if (AgoraEngine != null) { AgoraEngine.Dispose(); AgoraEngine = null; } base.OnDestroy(); }