private async void FlightModeBtn_Clicked(object sender, EventArgs e) { try { Log.Debug(Globals.LogTag, "Modem flightmode call start"); await modem.SetFlightMode(PowerFlightModeRequest.Enter); Log.Debug(Globals.LogTag, "Modem flightmode set Enter success"); bool isFlightMode = await modem.GetFlightMode(); Log.Debug(Globals.LogTag, "Modem flightmode get success , flightmode = " + isFlightMode); await modem.SetFlightMode(PowerFlightModeRequest.Leave); Log.Debug(Globals.LogTag, "Modem flightmode set Leave success"); isFlightMode = await modem.GetFlightMode(); Log.Debug(Globals.LogTag, "Modem flightmode get success , flightmode = " + isFlightMode); } catch (Exception ex) { Log.Debug(Globals.LogTag, "Modem flightmode ,exception = " + ex.ToString()); } }