Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android show dialpad without manifest permissions

Users are complaining about call phone permission in Google Play. How can I show the Android dial pad with pre-populated number from my application without needing permission in the manifest?

like image 886
QVDev Avatar asked Jul 23 '12 10:07

QVDev


1 Answers

Instead of using Intent.ACTION_CALL or Intent.ACTION_DIAL do the following:

            Intent callIntent = new Intent(Intent.ACTION_VIEW);
        callIntent.setData(Uri.parse("tel:0123456789"));
        startActivity(callIntent);

This will open up the standard Android dial pad with the given number. This way you don't need to use the permissions CALL_PHONE or DIAL. No modification of the manifest.xml is needed.

like image 163
MartinCo Avatar answered Nov 18 '22 22:11

MartinCo