1

How to resolve this issue android.permission.MODIFY_PHONE_STATE. when i'm trying to answer my call this error should occurred.

user1756309
  • 11
  • 1
  • 3

2 Answers2

3

The problem you're having was introduced in Android 2.3 (Gingerbread). Any code you have that requires MODIFY_PHONE_STATE will work all the way up to (and including) Android 2.2, but will break for Android 2.3+.

A change was checked in by David Brown that limits the use of the MODIFY_PHONE_STATE permission to system apps. System apps are either

Pre-installed into a system folder on the ROM Compiled by a manufacturer using their security certificate There was an issue opened for this, but Google killed it. They did this on purpose, not by accident, and clearly have no intention of reversing it.

I suspect you're trying to use a hidden API like ITelephony. I am - and I got burned by this. The Android team's justification is that it was hidden and you shouldn't have been using it anyways. My personal belief is that there was no security risk (it needed a permission) so just leave it in place until they finish building a proper public Telephony API.

Royston Pinto
  • 6,681
  • 2
  • 28
  • 46
-1

You are not having this permission in the app manifest

Add permission in the manifest android.permission.MODIFY_PHONE_STATE

If the problem still remains please follow the stackoverflow internal link.

Community
  • 1
  • 1
AppMobiGurmeet
  • 719
  • 3
  • 6