android - How to implement multiple GCM push notifications in a single app? -


i'm trying implement 2 3rd party libraries (parse & localytics) uses gcm push notifications can't seem both work together. it's either 1 or other work.

<receiver android:name="com.parse.gcmbroadcastreceiver"           android:permission="com.google.android.c2dm.permission.send">         <intent-filter>             <action android:name="com.google.android.c2dm.intent.registration" />             <action android:name="com.google.android.c2dm.intent.receive" />         </intent-filter> </receiver>    <receiver android:name="com.localytics.android.pushreceiver"           android:permission="com.google.android.c2dm.permission.send" >         <intent-filter>             <action android:name="com.google.android.c2dm.intent.registration" />             <action android:name="com.google.android.c2dm.intent.receive" />         </intent-filter> </receiver> 

gcm aware of app, not content of gcm payload.

you need common receiver can parse intent received particular data identifies localytics or parse, forward intent appropriate receiver either service.

gcm based on "app registration" not on "app feature registration" - deliver app, not particular receiver within app.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -