0
我开发了一个应用程序,它使用Mixpanel推送通知。它们运行良好,包括深度链接。Android Mixpanel推送通知声音
问题是,我的顾客希望他们收到声音后,但他们不发挥任何声音。
阅读文档后,我知道对于iOS来说,就像在自定义数据中添加一个字段一样简单,但对于Android来说,没有声场可以自定义该字段。 如果我没看错的唯一的解决办法是延长Mixpanel广播接收器,所以我改变了我的AndroidManifest从这个:
<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>
这样:
<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>
而且我已经添加了这个类.auxiliary.LocalNotificationBroadcastReceiver:
从Mixpanel发送import com.mixpanel.android.mpmetrics.GCMReceiver;
public class LocalNotificationBroadcastReceiver extends GCMReceiver {
@Override
public void onReceive(final Context context, Intent intent) {
super.onReceive(context, intent);
}
}
这种方式推送通知仍然可以接收到正确的,但我不知道如何添加声音THI的通知。
任何帮助将不胜感激!