0

I am using the local notification plugin for Cordova. When the app goes to the background on Android and when the app comes to the foreground the notifications are hidden from the notification area. I can still get them from getById.

How can I get a notification that stays until I cancel or clear them? Or is this Android specific behaviour?

Dinkheller
  • 4,631
  • 5
  • 39
  • 67

1 Answers1

0

You should check out the backgroundmode plugin to be able to control it (and the notifications) when it goes to the background. Also from the same author, a good notification plugin.

"Cordova plugin to prevent the app from going to sleep while in background.

Most mobile operating systems are multitasking capable, but most apps dont need to run while in background and not present for the user. Therefore they pause the app in background mode and resume the app before switching to foreground mode. The system keeps all network connections open while in background, but does not deliver the data until the app resumes."

Eric
  • 9,870
  • 14
  • 66
  • 102
  • Hi Eric. I am using the notification plugin you mentioned. But is it standard to Android, that the notifications are hidden when the app come from / goes to background? ... That's why you mention the backgroundmode plugin? – Dinkheller Sep 16 '15 at 07:13