How to grant MODIFY_PHONE_STATE permission for apps ran on Gingerbread

后端 未结 5 1397
粉色の甜心
粉色の甜心 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:47

    If your application for Gingerbread is running on a tablet and there is no phone, then this is expected behavior. You'll need to make the telephony related permissions in your manifest non-mandatory to run on tablets.

    Try this in your manifest:

    
    

    Of course, I'm making a big assumption about the tablet. You can also see the Android reference here.

提交回复
热议问题