Why am I requesting “Device ID & call information” permission on Android?

那年仲夏 提交于 2019-12-11 03:22:54

问题


Testing my Android app (made in Unity) on the live store shows that it requests "Device ID & call information". As far as I can tell, I don't request these permissions. Here are the permissions I request in my AndroidManifest.xml file. Is this a permission required for all apps? Or is it hidden under one of these other permissions?

<uses-permission android:name="com.android.vending.BILLING" />
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Thanks!


回答1:


I just spent an absurd amount of time trying to resolve this so figured I would share with anyone out there going through a similar agony.

Removing the permissions from your manifest will not necessarily remove them from the final build. Unity auto-detects required permissions from all included libraries. The libraries which are most likely causing you to have this permission included are from the Facebook sdk.

If you want to keep the Facebook sdk in the build, there's a relatively straightforward solution. Remove the Facebook SDK (completely) and install a version <= 7.80. For whatever reason, the changes to the sdk in 7.9+ prompt Unity to auto-include the READ_PHONE_STATE permission which triggers the Device ID & Call Information permission warning in google play.



来源:https://stackoverflow.com/questions/25089311/why-am-i-requesting-device-id-call-information-permission-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!