I cannot grant the following permission on my app..Kindly suggest any alternative?

1.6k Views Asked by At
<uses-permission android:name="android.permission.CALL_PRIVILEGED"/>

I cannot grant this permission in the android manifest file as it shows the following error:

Permissions with the protection level signature or signatureOrSystem are only granted to system apps. If an app is a regular non-system app, it will never be able to use these permissions.

So,what should i do now?

3

There are 3 best solutions below

0
On BEST ANSWER

Permissions with the protection level signature or signatureOrSystem are only granted to system apps. If an app is a regular non-system app, it will never be able to use these permissions.

So,what should i do now?

If your app is expected to run on non-rooted devices, then you're simply doomed - you can do nothing, unless you have platform keys to sign your app with it.

Alternatively, you may narrow your audience to rooted devices only but that would allow you to do what you want incl. using features usually reserved for the platform or system apps ony.

Finally you may rethink your approach. Perhaps what you want to do can be achieved other way, w/o need of elevating app privileges.

0
On

For this "CALL_PRIVILEGED" permission , you will need a rooted device and the app must be installed as a system app only.

2
On

From the documentation (https://developer.android.com/reference/android/Manifest.permission.html#CALL_PRIVILEGED):

String CALL_PRIVILEGED
Allows an application to call any phone number, including emergency numbers, 
without going through the Dialer user interface for the user to confirm the 
call being placed.

Not for use by third-party applications.

So, the short answer is that you can't use it. What are you trying to accomplish?