Get location (background and foreground) every 5 minutes for private app


i’m developping a private application. I have to get location every 5 minutes and send it to my webservices, even if the application is in background

This app is private and is not submited in app stores.

Do you have a solution or an idea for this problem ?

Thanx for your help :smile:

You can use the Cordova GeoLocation plugin for that and implement a watchPosition so that it sends back location data every time the geolocation of the device changes.

Then you can just wrap this in a function that waits every 5 minutes to broadcast the data.

Hi !

Thanx for your help. Your plugin works if the application is in background ?

If you need background geolocation then perhaps you’ll want to check this plugin out:


I tried this plugin and it’s work very fine ! Thanks to his author and thanks to you for your help !

Plugin author here. Vastly improved premium version available here

1 Like

lol love the floating chat picture on the site :slight_smile:

Which plugin did you tried to achieve this, Please help.

I am also trying to location for every 5 mins

You cannot think in terms of time with iOS, you must think in terms of distance (ie: distanceFilter).

You don’t say “I want a location every 5 minutes”, you say “I want a location every kilometre”

However, if you use my iOS-only background-fetch plugin, this will awaken your app in the background about every 15 min. You can use any geolocation plugin you wish to execute a #getCurrentPosition in the fetch callback.

It’s working on Android and iOS?
Can i do an http.get(lan.ip) every 15 minutes?
What happens if i kill the app?