简体   繁体   中英

pushwoosh Custom Push Broadcast Receiver not fire when application is close

I have created Custom Push Broadcast Receiver for handle push notification and save notification in local database,but in my app custom receiver not fire when new notification arrive and app is close.

I want to save notification in database when app is close and notification arrives.

Please suggest and help me.

you have to write broadcastreceiver like this and register it manifest so whenever the notification will arrives this receiver will take action.

 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

    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM