【问题标题】:handle pushwoosh with custom view使用自定义视图处理 pushwoosh
【发布时间】: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


    【解决方案1】:

    尝试使用工厂(扩展 AbsNotificationFactory )而不是自定义广播接收器。

    就像这里的指南一样:
    http://docs.pushwoosh.com/docs/android-faq#customizing-push-notifications

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-23
      • 2013-05-05
      • 2014-05-12
      • 2012-07-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多