Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android M : Billing and GCM permissions

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 ?

like image 400
grunk Avatar asked Aug 18 '15 13:08

grunk


1 Answers

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.

like image 77
Floern Avatar answered Oct 05 '22 23:10

Floern