Android permissions: Phone Calls: read phone state and identity

前端 未结 2 700
礼貌的吻别
礼貌的吻别 2020-11-27 11:32

My android app has nothing to do with phone calls, but I\'m seeing that when I install a debug build on my test device it requires \"Phone Calls: read phone state and identi

2条回答
  •  时光说笑
    2020-11-27 12:13

    Android 1.6 changelog: http://developer.android.com/sdk/android-1.6.html#api

    WRITE_EXTERNAL_STORAGE: Allows an application to write to external storage. Applications using API Level 3 and lower will be implicitly granted this permission (and this will be visible to the user); Applications using API Level 4 or higher must explicitly request this permission.

    But that is only one of them. For some reason the official change log is missing the info about READ_PHONE_STATE. The full story is cleared up here: http://blogs.zdnet.com/Burnette/?p=1369&page=3

    New permissions. 1.6 programs must explicitly request the WRITE_EXTERNAL_STORAGE permission to be able to modify the contents of the SD card, and they must explicitly request the READ_PHONE_STATE permission to be able to be able to retrieve phone state info. Apps targeting earlier versions will always request these permissions implicitly.

    So as you can see, there is no way to publish an app targeted at 1.5 or earlier without requesting those permissions when installed on phones running 1.6 or higher.

提交回复
热议问题