Is it possible to build an app with phonegap build, that runs some background process(like every few minutes whether app opened or not) .
- 9 Posts
- 0 Reply Likes
Posted 8 years ago
ryan, Developer
- 1538 Posts
- 132 Reply Likes
On Android and iOS, your app should continue to run in the background after it is closed by clicking the home button or back button (unless the user explicitly kills the app). So you should still be able to run javascript, and use a JS timeout to intermittently run code.
- 10 Posts
- 0 Reply Likes
Hi Ryan,
Will JS timeout work like Android Background service? If user closes the app JS will not run, right?
Will JS timeout work like Android Background service? If user closes the app JS will not run, right?
- 2 Posts
- 0 Reply Likes
Hi Ryan,
Will it be possible to keep running background service even after user kill the app explicitly ?
actually i want to make service which will be running in background for infinite time.
even after user kills the app.
i have implemented plugin from below url :
https://github.com/katzer/cordova-plu...
but it will kills the service as soon as the app was killed.
Will it be possible to keep running background service even after user kill the app explicitly ?
actually i want to make service which will be running in background for infinite time.
even after user kills the app.
i have implemented plugin from below url :
https://github.com/katzer/cordova-plu...
but it will kills the service as soon as the app was killed.
- 34 Posts
- 0 Reply Likes
I am currently working on the same thing. It is a monitoring system for parents. If you have figured this out, i would appreciate an email greatly. aklooze@hotmail.com
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 2 Posts
- 0 Reply Likes
Hi Petra,
Thank you so much for the reply.
Actually i want to make service which will run as daemon(user does not allow to stop the service from app).
i want to get geo location and store the same in database on every 5 to 10 minute.
for that i want to make service which will run in background and store user location in database.
And i want to implement same in Android/IOS7/blackberry10 and in windows phone if possible.
Thank you so much for the reply.
Actually i want to make service which will run as daemon(user does not allow to stop the service from app).
i want to get geo location and store the same in database on every 5 to 10 minute.
for that i want to make service which will run in background and store user location in database.
And i want to implement same in Android/IOS7/blackberry10 and in windows phone if possible.
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Please, allow me to give a personal opinion, first: I would be hesistant to accept an app that implements a "secret service" that can not be stopped and that tracks the whereabouts of the user.
Now, for Phonegap: PGB is a service that allows developers to create apps based on a webview. This means, that PGB expects html/javascript/graphis/css only. Within this app, you can make use of plugins...but it will still be an app with its webview.
As long as the app is active or 'stand-by', you can use the Geolocation plugin to implement the watchPosition() method and keep track of the user's position. You can use any persistent method (localStorage, indexedDB) to save the data for later use by the same app.
PGB allows building of apps for Android, iOS and WinPhone.
Now, for Phonegap: PGB is a service that allows developers to create apps based on a webview. This means, that PGB expects html/javascript/graphis/css only. Within this app, you can make use of plugins...but it will still be an app with its webview.
As long as the app is active or 'stand-by', you can use the Geolocation plugin to implement the watchPosition() method and keep track of the user's position. You can use any persistent method (localStorage, indexedDB) to save the data for later use by the same app.
PGB allows building of apps for Android, iOS and WinPhone.
Related Categories
-
PhoneGap Build
- 15111 Conversations
- 275 Followers



