Leanplum as secondary push provider (Android)
Closed this issue · 2 comments
Hello,
we're having problems to support Leanplum as an additional PNs provider, on top of Pushwoosh. Here are the changes they suggest making in the Manifest:
<!-- Leanplum Push Notifications -->
<receiver android:name="com.leanplum.LeanplumPushReceiver" android:exported="false">
<intent-filter>
<action android:name="com.leanplum.LeanplumPushListenerService" />
</intent-filter>
</receiver>
<service android:name="com.leanplum.LeanplumPushListenerService" android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<service android:name="com.leanplum.LeanplumLocalPushListenerService" />
<service android:name="com.leanplum.LeanplumPushRegistrationService" />
<service android:name="com.leanplum.LeanplumPushInstanceIDService" android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<!-- End Leanplum Push Notifications -->
Apparently the second receiver, and the fact that it uses the same action com.google.android.c2dm.intent.RECEIVE
in the intent-filter
, overrides the former's behaviour which deals directly with all kinds of GCM messages:
<receiver android:name="com.google.android.gms.gcm.GcmReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.app.app" />
</intent-filter>
</receiver>
Is there a way to integrate these so that at least all messages go through both providers? If not, do you have any other idea how to integrate these effectively?
Thanks in advance.
com.google.android.gms.gcm.GcmReceiver
starts only one GcmListenerService with the higher priority. The trick to use several GcmListenerService's is described here: http://docs.pushwoosh.com/docs/android-faq#can-i-use-two-gcmlistenerservices.
Thank you, I'll try this out soon and post out here the results.