【发布时间】:2016-05-22 13:13:13
【问题描述】:
我正在使用 pushwoosh 库,并且我有自己的 BroadcastReceiver 来处理推送通知。
我已经更新了 pushwoosh 库,现在我收到了两次通知,它们甚至看起来都不一样。
原因是我正在用我的班级处理我的推送,而 pushwoose 也用那里的班级处理通知:
公共类 GCMListenerService 扩展 GcmListenerService { private static final String TAG = GCMListenerService.class.getName();
public GCMListenerService() {
}
public void onMessageReceived(String from, Bundle data) {
Log.info(TAG, "Received message: " + (data != null?data.toString():"<null>") + " from: " + from);
try {
PushServiceHelper.generateNotification(this.getApplicationContext(), data);
} catch (Exception var4) {
Log.exception(var4);
}
}
}
如何防止 pushwoosh 处理通知?
【问题讨论】:
标签: android push-notification google-cloud-messaging pushwoosh