Reputation: 794
iam using Android Studio 2.1 and Android SDK 5. Android Studio is not recognizing the permission for CALL_PHONE. How to resolve this problem? In pictures you can see how i did it.
Upvotes: 0
Views: 1550
Reputation: 1259
Your manifest file is fine. Problem is with user denying permission for Call after application is installed.
You need to check for permission at runtime as
if (ContextCompat.checkSelfPermission(thisActivity,Manifest.permission.CALL_PHONE)
== PackageManager.PERMISSION_GRANTED) {
// your code here
}
Upvotes: 2