1

I get all push notifications which can be seen in tray.But after click on one of the notifications the app is open and the other notifications stay on bar But when you press the home button then the app goes in background and also the tray clears all notifications. But I want the notifications intact

on Clear :
1- App in background
2- Send Multiple notifications
3- you can see all Notifications
4- Click on one of theme and the app is opened
5- other Notifications stay in bar when the app is open
6- when you press back button or home button all the notifications removed

i'm using https://github.com/phonegap-build/PushPlugin

1 Answer 1

3

Your problem will be solved by removing the two lines that cancels the notifications once the home button is pressed:

final NotificationManager notificationManager = (NotificationManager) cordova.getActivity().getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancelAll();

These two lines are found in the onPause() method in PushPlugin.java file.

2
  • I tried doing this but still not able to resolve this problem. Jul 29, 2016 at 12:07
  • Hello, first just make sure that the cancelAll() method is not called somewhere else
    – Mich
    Aug 2, 2016 at 5:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.