Symbol '#' doesn't fit into the field of entry of the phone number.



  • I'm trying to get my phone in the field of entry, and I don't miss the sign of the barrel.

    strBuild.append("tel:").append(mPrefix).append(tmp.getPhone()).append("\u0023");
    Intent callIntent = new Intent(Intent.ACTION_DIAL);
    callIntent.setData(Uri.parse(strBuild.toString()));
    

    URI is clearly built, in the logs, it's all right, but there's no sign at the end.



  • https://stackoverflow.com/a/4816002 with large SO:

    Okay. # is a specialty for URI, it has to be screened:

    Intent out = new Intent();
    out.setAction(Intent.ACTION_DIAL);
    out.setData(Uri.parse("tel:" + Uri.encode("+12345#123")));
    startActivity(out);
    

    Or write directly. %23

    https://stackoverflow.com/a/11981581 Use Uri.fromParts:

    Intent intent = new Intent(Intent.ACTION_DIAL);
    intent.setData(Uri.fromParts("tel", "#123456#", "#")); 
    startActivity(intent); 
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2