How to grant MODIFY_PHONE_STATE permission for apps ran on Gingerbread

后端 未结 5 1399
粉色の甜心
粉色の甜心 2020-11-22 15:40

I write an application that attempts to modify phone call state. It works well on Android 2.2 or less, but throw an exception on Android 2.3 because of the lack of permissio

5条回答
  •  旧巷少年郎
    2020-11-22 15:54

    MODIFY_PHONE_STATE is a system-only permission, so apps are not allowed to get it.

    This may have changed from previous versions of the platform, but that is okay because it is only protecting private APIs, so if you are doing something that requires it, you are using private APIs that are not supported and will result in things like your app breaking on different builds of the platform.

    The stack crawl you include is not complete, so there is no way to tell what you are actually doing.

提交回复
热议问题