-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling background location #104
Comments
After first deleting the app from my Phone, I just did a fresh install of Sample App
I see no issue here. |
The default for The only reason this is even configurable today is because someone actually requested the ability (issue #70) to be able to request You do not have to specify this. The plugin strongly desires |
If I were you, I would analyze my other 3rd party plugins and ask "Might any of these other plugins be requesting |
Sorry, I'm not sure if I framed my question right. The new iPhone had the setting WhenInUse. I did not get the popup that you show above. Changed it manually via settings then it worked. My question was about how to detect that (whatever the cause) and inform the user that locations will not be recorded. |
Show me the plugins in your app:
|
com.transistorsoft.cordova.background-geolocation 1.4.1 "BackgroundGeolocation" Thx. |
As I suspected, you're using I suggest you get rid of |
Thx for suggestion. I was using it to find out whether location was enabled before the app got properly started. It's a dependency. I guess I need to find a different way to do that. |
My plugin has a #getCurrentPosition method |
Thx for that and sorry for delay in replying. Had to fix iPhone.
After that the plugin is silent. Did not get the authorisation popup as above. I tried this with different location settings - same result. Update: I also tried calling configure() and not waiting for it. In this case I got callbacks from getCurrentPosition(). However, after calling start() I did not get any callbacks even when moving 1/2 mile, although I did see the odd message mentioning "stationary". Any further suggestion pls? Thx. |
|
Thx @christocracy I had been calling it wrongly and am now using the above. At first it crashed horribly so after a while I realised this was a build issue and nuked everything to start again. Now seems OK, subject to testing on the move. In this use case I do not want to start tracking immediately so after getting the location (to make sure user has enabled it) I call stop() and then start() again when ready to track. Update: it is not recording location in the background. Here's my code:
You will see that I have switched off autoSync. My onLocSuccess() is supposed to be called by the 'location' event and that logs the location. In the log I see it calling me back just once after I call start(). I wonder if it is correctly sensing movement? Versions: cordova 6.2; iOS 9.3.2 Note: there may be a documentation issue on https://github.com/transistorsoft/cordova-background-geolocation-lt/wiki/Background-Tasks as this shows a different calling pattern for configure(). Nevertheless, I am following your example above. |
When you say "it's not recording location in background", are you moving? You're aware that when initially |
Yes. I was aware of that which is why I did moving tests. Since this is a walking app 3 blocks is a lot. I have added a call to bgGeo.changePace() which causes tracking. At the moment this is producing some readings, many of which look wildly out (by as much as 1/2 mile). As above, stationaryRadius is set to 5. I will do some more moving tests. I did test the iPhone using endomondo. No wild readings in that case but the app may be handling them somehow. |
You're not going to get the most accurate results possible because you're using GPS is used only with
|
Thx for that. The good news is that there was only 1 wild point per session. desiredAccuracy: 0 seems to fix it. If not (after more moving tests) I can just look for changes beyond walking speed and ignore them. |
hello christocracy , i have a problem with startOnBoot. I set it to true on my options but it does not trigger the location after restarting my device |
iOS requires a significant location change to re-awaken. After closing, it On Tuesday, July 19, 2016, microzonesolutions notifications@github.com
Snet form Gmail Mobile |
Hi christocracy Okay thanks, problem fixed but i have one more problem which i believe it will fix all my problems. How can i view my SQL lite output ? i believe the plugin has build-in SQL lite, so i do get my locations and all, but i want to know where can i view my SQL lite output because i want to retrieve all the data saved on SQL lite and post it to my server . |
Have you looked at the docs and glanced through every possible method The plugin has its own native http layer. You don't need to do http with On Wednesday, July 20, 2016, microzonesolutions notifications@github.com
Snet form Gmail Mobile |
Are you a customer? |
Yes i am |
Why then are posting issues at the Free repo and not the private Premium, customers-only repo? This link will be 404 to you, since I see you're not a member of the private repo. If you're a customer, whoever ordered the product can provide you access by visiting the Customer Dashboard: |
I just loaded up my previously-tested cordova app into a new iPhone and got no background responses. I discovered a setting that had to be set as "always" for the plugin to do its work. I am wondering if there is a way to determine this setting before trying to use it, better still a way to force it to "always" (or "never").
Thx.
The text was updated successfully, but these errors were encountered: