Location Plugin OnPositionChanged

Location Plugin OnPositionChanged


Good afternoon everyone, i am trying to build a mobile app in which i want to have the users position checked automatically every 5 minutes. I am now able to check the position at all time using the OnPositionChanged event but the goal was to check only every 5 minutes so that the device isn't constantly looking for GPS signal since it could drain the devices battery a lot and isn't really necessary.

I was also wondering if possible, to set a radius from the original coordinates from which the location isn't assumed as changed.

Thanks in advance.

Hi Andre,

I'm not sure, but I would think the OnPositionChanged is just the notification if the position changed, but the Location plug-in still checking the location continuously? If not (e.g. there's a seperate "one-shot" location determination), you need to trigger a timer another way, e.g. through JavaScript (though that may be difficult with page changes) or perhaps another plug-in.

As for setting a radius, that's possible with the GeoFence plugin, but that may or may not be what you need, depending on your requirements.