![](/img/trans.png)
[英]PushWoosh Custom Push Broadcast receiver intent to activity gives extras null
[英]pushwoosh Custom Push Broadcast Receiver not fire when application is close
我已经创建了用于处理推送通知的自定义推送广播接收器,并将通知保存在本地数据库中,但是在我的应用程序中,当新通知到达并且应用程序关闭时,自定义接收器不会触发。
我想在应用程序关闭且通知到达时将通知保存在数据库中。
请提出建议并帮助我。
您必须编写这样的broadcastreceiver并注册它的清单,以便每当通知到达时,此接收器都会采取措施。
public class PushWooshManager extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
Log.i("PUSH", "received");
if (intent!=null){
write your code to store the notification data
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.