+1
I am trying to get the location when the app in on background. I succeeded on Android but not on iOS. My code is:
var Observable = require("FuseJS/Observable");
var GeoLocation = require("FuseJS/GeoLocation");
var Timer = require("FuseJS/Timer");
var TimmerGPS;
function StartGPS() {
TimmerGPS = Timer.create(function() {
GeoLocation.getLocation(25000).then(function(location) {
console.log(JSON.stringify(location));
//Do something with the location
}).catch(function(fail) {
console.log("getLocation fail " + fail);
});
}, 30000, true);
}
function StopGPS() {
Timer.delete(TimmerGPS);
}
module.exports = {
StartGPS: StartGPS,
StopGPS: StopGPS
};
Any idea how can I do this on iOS?
When I try on iOS the Timer
Pause when the app is on background
Background Geolocation is now officially done!
Big thanks and shout out to the guys at the Good Factory for sponsoring its development.
[UPDATE - 11 Feb 2020]
Its included in the latest versions of Uno & Fuselibs
Uno PRs:
Fuselibs PR:
3 Likes