Red-Folder / bgs-core

Core code for the Cordova Background Service
Other
236 stars 104 forks source link

Need help #75

Closed anup5708 closed 7 years ago

anup5708 commented 7 years ago

Hi,

I look around your sample example of background service, which seems good to have a change of text for every 60sec.

But when the app goes background is it the background service is still running.because when i open the app it again starts an alert messages as "Service now running" in allDone() method.

What to do If I need to pop up a simple "hello" message for every 5 seconds even the app is open and app is closed. please help...

Red-Folder commented 7 years ago

You'd need to use an Android notification (https://developer.android.com/guide/topics/ui/notifiers/notifications.html)

Within the Service code, fire off a notification at the relevant point (this will require Java code).

If the app is closed, you are unable to provide a JavaScript alert or similar (because there is no JavaScript context to run in).