christocracy / cordova-plugin-background-geolocation

Sophisticated, battery-conscious, cross-platform background-geolocation with motion-detection
http://transistorsoft.github.io/cordova-background-geolocation
492 stars 744 forks source link

Background location update is disregarding the "desiredAccuracy" attribute #185

Closed kritijain22 closed 9 years ago

kritijain22 commented 9 years ago

I am using background location update plugin in my Android application. I want the user to get push notification whenever the user moves 100 meters in distance. Although I have set it to track for location updates only after the user has moved at least 100 mts but sometimes it sends out spontaneous updates by disregarding the 100 mts limit and the user is receiving multiple push notifications. Please help me on this.

christocracy commented 9 years ago

I want the user to get push notification whenever the user moves 100 meters in distance.

A Push notification from the server when the user moves 100m? Why would you do that? Server push is great, I use it to trigger my plugin ON and OFF, but what you're doing here sounds weird.

Although I have set it to track for location updates only after the user has moved at least 100 mts but sometimes it sends out spontaneous updates by disregarding the 100 mts limit and the user is receiving multiple push notifications.
Please help me on this.

There is no way to understand what you’re experiencing without map-screenshots or logs. Anyway, it's probably not unusual what you're experiencing -- what's unusual is counting upon distanceFilter to send a server Push every 100m. However, the free Android version is no longer supported -- All new Android development occurs in the Premium Version. The free Android version is unsuitable for production apps, since it drains the device's battery constantly, even when at-rest.

In addition, I suspect this server-push thing you're doing is a hack to get around a limitation of the free version, a limitation which doesn't exist in the Premium Version.