-1

code from cloud-messaging/android/client#manifest

<permission android:name="<your-package-name>.permission.C2D_MESSAGE" android:protectionLevel="signature" /> <uses-permission android:name="<your-package-name>.permission.C2D_MESSAGE" />

Kim Huang
  • 7
  • 1
  • 1
  • you've got the documentation, but why you ask here then? – ikhsanudinhakim Jun 28 '16 at 03:10
  • You should read more about the [Android Manifest elements](https://developer.android.com/guide/topics/manifest/manifest-element.html). – AL. Jun 28 '16 at 03:34
  • Maybe I doesn't explain my question clearly, but I have found the answer: http://stackoverflow.com/questions/5121061/c2dm-how-to-use-c2d-message-permission https://github.com/google/gcm/issues/4 – Kim Huang Jun 28 '16 at 04:32

1 Answers1

0

Because google says so? :)

It is so that the app declares a dependency which is then auditable and viewable by the user. And if you are wondering why some permissions must be explicitly requested and how it is decided which permissions are dangerous and which not (and hence should be explicit) -- that's a call that Google, as the owner of the Android platform, has made. Obviously, those choices are driven by adoption rates, a component of which is consumer's demand for transparency, so there's a loose feedback from app users into those choices but ultimately Google makes such decisions opaquely. We can only guess.

Creos
  • 2,445
  • 3
  • 27
  • 45