1

I use URL_launcher to send sms but with some android phone I have "+" who is changed in space " ". With my galaxy s7 I haven't this issue.

I found this question who speak about Uri.encodeComponent(numberTypedByUser) but I tried but without result.

I tried to change + by \%2B (it's work for my galaxy s7 but not for other smartphone).

Gradle is UTF_8.

 localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)

Here is my code:

  var Phone_Number = '$indicator$number';
   var body_text="\%2B";    //  \%2B is like +

    var uri = 'sms:$Phone_Number?body=$body_text' ;
    if (await canLaunch(uri)) {
      await launch(uri);
    }
Nitneuq
  • 3,866
  • 13
  • 41
  • 64

0 Answers0