i using mixpanel in app , getting 2 notifications mixpanel. using gcm on device chat. how can receive both mixpanel , notifications. btw generate gcm reg_id via code.
manifest file:
<receiver android:name=".gcm.gcmbroadcastreceiver" android:permission="com.google.android.c2dm.permission.send"> <intent-filter android:priority="100"> <!-- receives actual messages. --> <action android:name="com.google.android.c2dm.intent.receive" /> <category android:name=“com.example.mainactivity.gcm" /> </intent-filter> </receiver> <receiver android:name="com.mixpanel.android.mpmetrics.gcmreceiver" android:permission="com.google.android.c2dm.permission.send" > <intent-filter> <action android:name="com.google.android.c2dm.intent.receive" /> <action android:name="com.google.android.c2dm.intent.registration" /> <category android:name="com.example.mainactivity.gcm" /> </intent-filter> </receiver> <service android:name=".gcm.gcmintentservice" />
i have added :
mixpanel.registersuperproperties(props); mixpanel.identify(id); mixpanel.getpeople().identify(id); mixpanel.getpeople().setpushregistrationid(reg_id); mixpanel.getpeople().initpushhandling(sender_id);
in gcmbroadcastreceiver have added:
if (intent.getextras().containskey("mp_message")) { string mp_message=intent.getextras().getstring("mp_message"); }
check if have added same device token in multiple people's property (comma separated)
Comments
Post a Comment