Special characters for dialing

In Brazil, we use # to make some types of calls. For example, see the balance of a phone with a prepaid account, something like this: * 222 #

I am using this code to call:

public static void doCall(Context context, String number) {
    Uri uri = Uri.parse("tel:" + number);
    Intent callIntent = new Intent(Intent.ACTION_CALL, uri);
    context.startActivity(callIntent);
}

      

Android automatically removes #? Has anyone experienced this?

Thanks, Mateusz

+3


source to share


1 answer


You need URL-escape "#" using "% 23" in its place:



tel:*222%23

      

+3


source







All Articles