Are you trying to make an app that does something every x minutes, even when the app is in the background and/or the screen is turned off… tried backgound-mode plugin but it only works reliably when the phone is plugged in… did you ever found a solution to this?
Hello there!
Great solution you saved my day! Thank you!
One more question:
Is it available push OK button on USSD response popup on android ?
For example call to “*100#” and hit OK programmatically ?
Thanks for answer!
hi,
i have tried this but it works only at first time,next time app completely closed.is there any thing else to set in the code.at first time app is moved into cached app area.after that when i closed the app, it completely closed.
I got an app that has to run all the time and survive reboots. The app does an alarm at sunrise time every day. That’s the whole point of the app. Set it and forget it until that preference run all the time is unchecked.
Since the sunrise changes everyday, my app has to compute the next sunrise and when that time comes boom, vibrate the phone and play a notification.
I got a js timer on the app that checks every minute to see how much time left and when it is the last minute, it updates itself to run every second so it can display 59, 58, 57… when it is 0, we hear the alert!
When the app is on, this is not a problem.
When the app goes to background, it seems to be working with just the “backgound-mode plugin”.
But I have no idea how to put the app in the background after a complete shutdown or battery run out!
I thought i only needed that while I programmed with my device plugged in via USB to debug… I noticed Android started to close the app when in background mode only while NOT plugged to computer via usb. That is why I modified the power management plugin to get everything working all the time!
I have installed both the background mode and the power management plugin. I want to call a function daily on a spcific time. It works when the app in background. If i closed the app, the background service not running. The background service running only when the app in background.
I am developing an employee management app. In that i have to trigger on e function at 9 O’Clock to signin automatically.It should work even the app not running. To achieve this i want to run the app in background.
@boltex … I’m trying to do a upload of the photo and some information to server like the way of uploading a photo in facebook…but while uploading ,if the app is closed it is failed…Can you please help me how to achieve this even when they close the application while uploading. your plugin is working when the app is in background. But i want to run that even when the app is close
hello @nakulkundaliya i modified the java files in this plugin “cordova-plugin-mauron85-background-geolocation” to achieve my goal but just in android.
if u want this plugin after modification i will be uploaded for you.
sorry for bad english
plugin : https://ufile.io/2a922
uncompress this file in the folder “com” in cordova-plugin-mauron85-background-geolocation plugin
Most of the changes in the file LocationService.java