Exemple #1
0
 public static void SendSampleBackgroundSms(this ISmsTask smsTask)
 {
     if (smsTask.CanSendSmsInBackground)
     {
         smsTask.SendSmsInBackground("+27219330000", "Well hello there from Xam.Messaging.Plugin");
     }
 }
Exemple #2
0
 public static void SendSampleMultipleSms(this ISmsTask smsTask)
 {
     if (smsTask.CanSendSms)
     {
         smsTask.SendSms("+27219330000;+27219330001", "Well hello there from Xam.Messaging.Plugin");
     }
 }
        private void ClickPhone(Phone phone)
        {
            if (phone == null)
            {
                return;
            }

            ActionSheetConfig config = new ActionSheetConfig();

            config.Add(ResourceService.GetString("callAction"), () =>
            {
                IPhoneCallTask phoneDialer = CrossMessaging.Current.PhoneDialer;
                if (!phoneDialer.CanMakePhoneCall)
                {
                    UserDialogs.Instance.Alert(ResourceService.GetString("cannotCall"));
                    return;
                }
                phoneDialer.MakePhoneCall(phone.Number);
            });
            config.Add(ResourceService.GetString("messageAction"), () =>
            {
                ISmsTask smsMessenger = CrossMessaging.Current.SmsMessenger;
                if (!smsMessenger.CanSendSms)
                {
                    UserDialogs.Instance.Alert(ResourceService.GetString("cannotSms"));
                    return;
                }
                smsMessenger.SendSms(phone.Number);
            });
            config.Add(ResourceService.GetString("cancelAction"));
            UserDialogs.Instance.ActionSheet(config);
        }
 public static void SendSampleSms(this ISmsTask smsTask)
 {
     if (smsTask.CanSendSms)
     {
         smsTask.SendSms("+27213894839493", "Well hello there from Xam.Messaging.Plugin");
     }
 }
Exemple #5
0
        public SendSMSViewModel(ISmsTask smsTask, ISettingsService settingsService)
        {
            _smsTask         = smsTask;
            _settingsService = settingsService;

            SendSmsCommand = new Command <FareType>(SendSms);
        }
 public static void SendSampleSms(this ISmsTask smsTask)
 {
     if (smsTask.CanSendSms)
     {
         smsTask.SendSms("+27219330000", "Well hello there from Xam.Messaging.Plugin.  Some special characters. ÇÇẪ");
     }
 }
Exemple #7
0
        private void ClickPhone(Phone phone)
        {
            if (phone == null)
            {
                return;
            }

            ActionSheetConfig config = new ActionSheetConfig();

            config.Add(ResourceService.GetString("callAction"), () =>
            {
                IPhoneCallTask phoneDialer = CrossMessaging.Current.PhoneDialer;
                if (!phoneDialer.CanMakePhoneCall)
                {
                    UserDialogs.Instance.Alert(ResourceService.GetString("cannotCall"));
                    return;
                }
                phoneDialer.MakePhoneCall(phone.Number);
            });
            config.Add(ResourceService.GetString("messageAction"), () =>
            {
                ISmsTask smsMessenger = CrossMessaging.Current.SmsMessenger;
                if (!smsMessenger.CanSendSms)
                {
                    UserDialogs.Instance.Alert(ResourceService.GetString("cannotSms"));
                    return;
                }
                smsMessenger.SendSms(phone.Number);
            });
            config.Add(ResourceService.GetString("editAction"), () =>
            {
                EditPhone(phone);
            });
            config.Add(ResourceService.GetString("deleteAction"), () =>
            {
                if (Debtor == null || Debtor.Phones.IsNullOrEmpty())
                {
                    return;
                }

                UserDialogs.Instance.Confirm(ResourceService.GetString("reallyDelete"),
                                             ResourceService.GetString("yes"),
                                             ResourceService.GetString("no"),
                                             (accepted) =>
                {
                    if (accepted)
                    {
                        Debtor.Phones.Remove(phone);
                    }
                });
            });
            config.Add(ResourceService.GetString("cancelAction"));
            UserDialogs.Instance.ActionSheet(config);
        }