pmwisdom/cordova-background-geolocation-services

Speed and Heading is 0

Opened this issue · 3 comments

Hi, In return object from background service always have speed value 0 and heading is also zero. I am using android marshmallow and tried with Battery Optimization true and false but same result.

Tested with Mock Location app in android 6.0 working very fine.

 bgLocationServices.configure({
        //Both
        desiredAccuracy: 15, // Desired Accuracy of the location updates (lower means more accurate but more battery consumption)
        distanceFilter: 5, // (Meters) How far you must move from the last point to trigger a location update
        debug: true, // <-- Enable to show visual indications when you receive a background location update
        interval: 1000, // (Milliseconds) Requested Interval in between location updates.
        useActivityDetection: false, // Uses Activitiy detection to shut off gps when you are still (Greatly enhances Battery Life)

        //Android Only
        notificationTitle: 'Spotter', // customize the title of the notification
        notificationText: 'Watching for you set place.', //customize the text of the notification
        fastestInterval: 5000, // <-- (Milliseconds) Fastest interval your app / server can handle updates

    });

Same here.
I am yet to find a mobile device that implements speed, heading, altitude.
Probably not the fault of this plugin, but the device manufacture not implementing it.

Hmm, you should be getting whatever the device is passing back. All devices should be capable of passing back speed / heading. The code is literally putting all the values in a JSON object and passing it back to the WebView. I'll test it out and see if I can reproduce when I have some time.

But when i use "cordova-plugin-mauron85-background-geolocation" plugin on same device then speed, heading are passing back.