GCM prevents other apps from receiving Android messages

So as per this documentation - https://developer.android.com/google/gcm/client.html - this is one of the manifest / entry requirements:

ApplicationPackage + ".permission.C2D_MESSAGE" to prevent other Android applications from registering and receiving Android Application Messages. The permission name must match this pattern exactly, or the Android app will not receive messages.

So if my manifest doesn't have an intent filter using this permission string, or sendBroadcast()

that uses that string as the second parameter, how does it work? I mean like this piece of code:

<permission android:name="com.example.gcm.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />
<uses-permission android:name="com.example.gcm.permission.C2D_MESSAGE" />

      

prevents any other app from receiving push notifications of that particular app?

+3


source to share





All Articles