Example #1
0
        private async void SetMuteStBtn_Clicked(object sender, EventArgs e)
        {
            try
            {
                Log.Debug(Globals.LogTag, "Set call mute status start");
                var actionPath = await DisplayActionSheet("Path", "Cancel", null, Enum.GetNames(typeof(SoundMutePath)));

                var actionSt = await DisplayActionSheet("Mute Status", "Cancel", null, Enum.GetNames(typeof(SoundMuteStatus)));

                Log.Debug(Globals.LogTag, "Action: path = " + actionPath + ", mute status = " + actionSt);
                if (actionPath != null && actionSt != null)
                {
                    SoundMutePath        path   = (SoundMutePath)Enum.Parse(typeof(SoundMutePath), actionPath);
                    SoundMuteStatus      status = (SoundMuteStatus)Enum.Parse(typeof(SoundMuteStatus), actionSt);
                    CallMuteStatusRecord record = new CallMuteStatusRecord(path, status);
                    await call.SetCallMuteStatus(record);

                    Log.Debug(Globals.LogTag, "Set call mute status ends");
                }
            }

            catch (Exception ex)
            {
                Log.Debug(Globals.LogTag, "Set mute status, exception = " + ex.ToString());
            }
        }
Example #2
0
        private async void GetMuteStBtn_Clicked(object sender, EventArgs e)
        {
            try
            {
                Log.Debug(Globals.LogTag, "Get call mute status start");
                CallMuteStatusRecord record = await call.GetCallMuteStatus();

                Log.Debug(Globals.LogTag, "Get call mute status ends, mute status = " + record.Status + ", mute path = " + record.Path);
            }

            catch (Exception ex)
            {
                Log.Debug(Globals.LogTag, "Get mute status, exception = " + ex.ToString());
            }
        }