Android M : Billing and GCM permissions

僤鯓⒐⒋嵵緔 提交于 2019-11-30 22:30:51

问题


I have an app which use GCM and Billing. In order to make it Android M-ready i'm trying to implement the new permission model.

Unfortunately i can't find any informations about GCM and Billing permissions. They don't appear in the normal permission list and are obviously not available with Manifest.permission.* because they are not under android.permission namespace.

Nevertheless , we still have to declare them in the manifest

<uses-permission android:name="com.android.vending.BILLING">
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE">

So how those permissions should be handled ? Are they automatically granted ?


回答1:


Those permissions are granted automatically at install time:

checkSelfPermission("com.android.vending.BILLING") returns PERMISSION_GRANTED without ever asking the user.

As far as I understood the documentation and the behaviour of the most recent M preview, the only permissions that have to be requested at runtime are the ones that have a permission group, since the popups that are prompted to the user only mention permission groups.



来源:https://stackoverflow.com/questions/32073634/android-m-billing-and-gcm-permissions

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