I used the system alert plugin from github ( https://github.com/saileshmittal/phonegap-system-notification-plugin ) for android phonegap. I used this code in my index. HTML
My code is:
document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { var not_title = 'Message'; var not_text = 'Zou dit werken?'; var not_tText = 'Message'; navigator.systemNotification.onBackground(); navigator.systemNotification.onForeground(); navigator.systemNotification.createStatusBarNotification(not_title, not_text, not_tText); }
I got a notification icon both in the foreground and in the background. But you can run the whole application to run in the background when a button is pressed in the application and call my wcf services. I also need to get a warning even when running in the background. How to do it?
navigator.systemNotification.onBackground()
: this line launches the application in the background, and not another, only to display a notification after closing the application.
please help me, thanks in advance.
Mercy source share