I am having the problem that the hash sign is truncated. Does anybody know a solution? using unicode or %23 is not working in my case. Now the number that is dialed is *101
String uri = "tel:" + "*101#";
//String uri = "tel:" + "*101\u0023";
Intent intent;
intent = new Intent(Intent.ACTION_CALL, Uri.parse(uri));
Found a solution: String encodedHash = Uri.encode("#"); this did the trick...
I found a solution for this issue by replacing # in %23
String uri = "tel:" + "*133%23";
Intent intent;
intent = new Intent(Intent.ACTION_CALL, Uri.parse(uri));
This would be easier;
String no = textview.getText().toString();
if(no.contains("#")){
no = no.replace("#","%23");
}
startActivity(new Intent(Intent.ACTION_CALL)
.setData(Uri.parse("tel:" no)));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With