Exemplo n.º 1
0
 public async void SendSMS_OnClicked(object sender, EventArgs e)
 {
     // Send SMS
     try
     {
         LogIn.checkSMSPermission();
         var    smsMessenger = CrossMessaging.Current.SmsMessenger;
         string smsToBeSent  = (string)Application.Current.Properties["ToBeSend"];
         Debug.WriteLine("************" + smsToBeSent);
         if (smsMessenger.CanSendSmsInBackground)
         {
             try
             {
                 smsMessenger.SendSmsInBackground("7218185052", smsToBeSent);
                 hole.IsVisible = true;
                 messages.Text  = "Successfully Sent!";
             }
             catch (Exception ex)
             {
                 Debug.WriteLine(ex.Message);
             }
         }
     }
     catch (Exception ex) {
         DisplayAlert("OOPS", "You should give permission to the app to send SMS", "OK");
     }
 }
Exemplo n.º 2
0
 public async void Get_Help(Object sender, EventArgs ea)
 {
     Application.Current.Properties.Clear();
     LogIn.checkSMSPermission();
     await Navigation.PushAsync(new AskingContent(), true);
 }