Android Mixpanel push notification with sound -


i've developed app uses push notifications mixpanel. working well, including deep linking.

the problem customer want them sound once received don't play sound.

after reading docs know ios easy adding field in custom data, android there no sound field customize this. if i'm not wrong solution extend mixpanel broadcast receiver, changed androidmanifest this:

<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="my.package.name" />     </intent-filter> </receiver> 

to this:

<receiver android:name=".auxiliary.localnotificationbroadcastreceiver"           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="my.package.name" />     </intent-filter> </receiver> 

and i've added class .auxiliary.localnotificationbroadcastreceiver:

import com.mixpanel.android.mpmetrics.gcmreceiver;  public class localnotificationbroadcastreceiver extends gcmreceiver {      @override     public void onreceive(final context context, intent intent) {         super.onreceive(context, intent);     } } 

this way push notifications sent mixpanel still received correctly, don't know how add sound notification.

any appreciated!


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -