0

We have a problem with the cordova sms plugin. When you send an sms from ionic v1 app for the first time. Everything works perfect but as soon as you send a second sms the recipient has a comma after it. I'm not sure how this works but now a user will have to manually remove the separator.

         var number = 48802;
         $cordovaSms.send(number.toString(),message).then(
                  function (results) {
                    console.log("SMS sent! ",results);
                    $ionicLoading.hide();
                    $scope.job.paymentConfirmed = true;
                    submit();

                  },function (e) {
                    $ionicLoading.hide();
                    window.localStorage.job = JSON.stringify($scope.job);
                    $ionicPopup.alert({
                                        title: 'Posting Job Failed',
                                        template: 'Please check your airtime credit if insufficient please top up'
                                      });
                    console.log("Adding a job error ",e);
                  }
                );
4

1 回答 1

0

I just tested your code and can see this is not an error with the plugin, this is simply how the messaging app in iOS is designed.

When a number is entered into the recipient list, iOS will automatically put a comma there to allow you to add additional recipients.

The user does not have to manually remove the comment - all they have to do is click in the message textbox and the comma automatically goes away when they start typing their message.

To be clear: I don't think there is much you can do about this, unfortunately :-(

于 2018-03-01T20:37:43.133 回答