The dialer is not showing full ussd code eg: *123*1#

后端 未结 2 454
离开以前
离开以前 2021-01-22 06:47

I am using the url_launcher plugin for call, but the dialer is not showing the # character:

String url = \'tel:*123#\';
if (await canLa         


        
2条回答
  •  自闭症患者
    2021-01-22 07:15

    You need to use URL encoding for special character in a URL.

    So # equals %23

    This will work launch('tel:\*123\%23');

    Other Way is to encode the number typed by user and pass it through Uri.encodeFull(urlString) or Uri.encodeComponent(urlString)

    Like this.

    launch("tel:" + Uri.encodeComponent('*123#'));
    

提交回复
热议问题