Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android How to make a call that includes "#" or "p" in the dial?

Tags:

android

I need to make calls in my Android app that includes "#" or "p" in the dial.

If I use the next code:

Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:629941945#22412"));
    startActivity(intent);

It makes the call to the number 629941945 without the # and 22412.

And if I use the next code:

Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:629941945p22412"));
    startActivity(intent);

It makes the call without the "p": 62994194522412.

There is a form that I can solve it?

like image 593
user1570942 Avatar asked Aug 02 '12 09:08

user1570942


2 Answers

Intent shortcutIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:"+Uri.encode("*111*2#")));
startActivity(shortcutIntent);
like image 176
DynamicMind Avatar answered Oct 21 '22 10:10

DynamicMind


Try tel:629941945%2322412 instead of tel:629941945#22412

%23 will be replaced with #

like image 34
Durairaj Packirisamy Avatar answered Oct 21 '22 09:10

Durairaj Packirisamy