문제 설명
SMS를 보낼 때 flutter url_launcher의 해시 기호 뒤에 메시지 본문이 사라집니다. (Message body disappear after hash symbol in flutter url_launcher when send a SMS)
플러터에서 url_launcher를 사용하여 SMS를 보내고 있습니다.
하지만 내 메시지 본문에 해시 기호가 있고 해시 기호 이후에는 모든 메시지가 사라집니다.
예를 들어 ,
String uri= 'sms:$phoneNumber?body=123##456';
if (await canLaunch(uri)) {
await launch(uri);
} else {
if (await canLaunch(uri)) {
await launch(uri);
} else {
throw 'Could not launch $uri';
}
}
SMS에서 '456'이라는 숫자가 사라집니다.
문제 해결 방법은?
참조 솔루션
방법 1:
Replace "#" with "%23"
String uri= 'sms:$phoneNumber?body=123%23%23456';
(by ryanhuang1124、Bilal Aslam)