Comments (23)
Latest commit should obliterate those pesky toast messages. I'm going to go ahead and run the plugin all day and make sure there isn't something wrong, but I haven't had a problem with it not tracking yet.
What happens if you turn detectedActivities off?
from cordova-background-geolocation-services.
It should always be tracking, no matter what state your phone is in (in the background), unless you've force closed it of course.
It should restart whenever you A. Start moving again (when detected activities is activated) , and B. Move past the distance filter you've set. Once those two conditions are met it will start tracking again.
I'm going to throw up a demo later this week that you can try if your still having issues.
from cordova-background-geolocation-services.
Thanks for the quick answer. Background tracking is a crucial part of a app that I'm working on which has to be live within a few month, so I'm really happy you are helping me out here. I will keep working on it later to day when I get to work, but a working example would also be great!
I'll be using it to send coords to my rest backend which then will send out push messages to devices that are within range of certain targets.
from cordova-background-geolocation-services.
Still not getting the results I'm hoping for. Also I seem to get popups about activity changes even with debug: false...
from cordova-background-geolocation-services.
A.K.A set useActivityDetection : false
from cordova-background-geolocation-services.
Thank you. I'll try with detectedActivities off. What settings do you use? I was just using the settings from you example. Also I will update to latest to get rid of the toasts.
On my way to work (~15min walk and bus) I got 64 events (activity changes and gps coords) which my sample app sends to loggly. But only 4 was coords, the rest was activity changes....
By the way, I'm not quite sure what the desiredAccuracy and fastestInterval options does...
Just to be clear the settings I used was the aggressive ones from your example (interval 9000, fastest 5000, accuracy 20, distance 5) not the default ones from BackgroundLocationServices.js
from cordova-background-geolocation-services.
Disabling debug toast works like a charm now. I would be great if you updated the plugin version when you commit changes :)
I'm seeing this when compiling
Note: D:\projects\JobOnTheRun\geo3\platforms\android\src\com\flybuy\cordova\location\BackgroundLocationUpdateService.java uses unchecked or unsafe operations.
should I worry about that?
By the way my sample app is here: https://bitbucket.org/monkeystyle/cordova-background-gps-poc/
from cordova-background-geolocation-services.
For settings it depends, I usually want aggressive tracking, since its my own device. There are short descriptions of what each does in the README, but basically :
Desired Accuracy (Lower Means More Accurate) : Determines how much power the GPS gets while obtaining coordinates, which directly translates into how accurate the GPS coordinates you get back are. There is an accuracy number passed back with the location, which tells you how confident the device is that the coordinate that it sent back is where you actually are. (gps isnt 100% accurate).
Fastest Interval, which is only on android, tells the device the fastest interval that you want GPS coordinates handed back to you. Basically, how many updates your server / device wants to handle in MS. Basically you shouldn't get coordinates faster than your fastest interval.
If you want aggressive tracking, set distance : 0, desiredAccuracy : 0.
from cordova-background-geolocation-services.
And no don't worry about those warnings. I'll take a look at your code and put it up in the README as a sample. Thanks!
from cordova-background-geolocation-services.
Hi, the plugins works great! However, I can confirm previously mentioned bug - tracking stops few seconds after the device goes to standby mode (screen off).
(tested on some Huawei ALE L21)
from cordova-background-geolocation-services.
Android or iOS?
from cordova-background-geolocation-services.
Android! Not tested on iOS yet.
from cordova-background-geolocation-services.
hmmm my test device is Huawei ALE L21 too.. maybe it's a EMUI issue?
from cordova-background-geolocation-services.
@tomasmasek have you tried with useActivityDetection : false?
from cordova-background-geolocation-services.
could be related: https://support.strava.com/hc/en-us/articles/216942547-How-to-fix-GPS-recording-issues-on-Huawei-Ascend-P7
from cordova-background-geolocation-services.
OK, got it! I had to set my demo app as "protected" in android power management settings.
Since I'm an iOS user, I didn't know about such setting in Android.
Everything works well now, but I'll keep testing and keep you updated, if there will be something new.
Thank you for help guys.
from cordova-background-geolocation-services.
Cools. Let's hear how it goes, I'm still having trouble getting frequent enough updates... I need one every 2 min or so (when moving)...
from cordova-background-geolocation-services.
Try these options, which are basically the most aggressive :
{
desiredAccuracy: 0,
distanceFilter: 0,
debug: false,
interval: 2000,
fastestInterval: 1000,
useActivityDetection: false
}
from cordova-background-geolocation-services.
Super, I will try that.
from cordova-background-geolocation-services.
I changed to a S5 as my test device. Everything is working perfect now! I'm getting more than enough coords. Now i just need to tweak the settings to my needs. Also I will start testing on iOS soon. Any chance of a WP version of the plugin?
from cordova-background-geolocation-services.
@icedice no plan for Windows Phone support since I don't have any test devices.
Glad you got the S5 working though!
from cordova-background-geolocation-services.
Too bad :( I'm going to need WP support very soon. I might just port your plugin to WP if i got the skills :)
from cordova-background-geolocation-services.
Awesome, let me know if you start that up and i'll help in any way I can.
from cordova-background-geolocation-services.
Related Issues (20)
- IOS 11 turning off the accelorometer seems to do nothing
- Uncaught TypeError: Cannot read property 'backgroundLocationServices' of undefined
- Can't install plugin HOT 1
- Couple Questions
- Very bad accuracy on Android?
- Phonegap Build error Android
- Cordova Build Error
- Android app was closed HOT 1
- SWIFT 3 not supported anymore by Apple HOT 2
- [email protected] getting crashed while start the service HOT 1
- Plugin put app in background
- How to authorize background geolocation on the phone ? HOT 1
- Error on install plugin ionic 3 project HOT 2
- Frequency of updates HOT 5
- [HELP] Cannot read property 'backgroundLocationServices' of undefined HOT 1
- Request to include accelerometer and compass information
- Different intervals between iOS and Android devices HOT 2
- Doesn't work on Android 8 (Oreo) HOT 5
- Send geolocation data to backend
- Android 6.0.1: Plugin not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-background-geolocation-services.