Skip to content
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

BackgroundGelocation error:undefined #2

Open
shaikhussian opened this issue Nov 13, 2017 · 6 comments
Open

BackgroundGelocation error:undefined #2

shaikhussian opened this issue Nov 13, 2017 · 6 comments

Comments

@shaikhussian
Copy link

shaikhussian commented Nov 13, 2017

when i run this example i am getting an error like this please help me, How to resolve this.

img_0020

@mauron85
Copy link
Owner

If you have been using previous version, I recommend you to remove project and clone again.

I've just tested on clean repo, it's working fine

@shaikhussian
Copy link
Author

shaikhussian commented Nov 14, 2017

@mauron85 i want to send my location to my db for that i wrote like this
`
BackgroundGeolocation.on('location', (location) => {
console.log("location123:"+JSON.stringify(location))
BackgroundGeolocation.startTask(taskKey => {
console.log("taskKey123:"+taskKey)
//Here I am calling my api post service for passing the location to db

    // execute long running task
    // eg. ajax post location
    // IMPORTANT: task has to be ended by endTask
    //BackgroundGeolocation.endTask(taskKey);
  });
});

`

i have questions that is this function call every time or only once

i want to track my location when app is in background also every time

can please help me and give some suggestions please

@mauron85
Copy link
Owner

Basically you have to wrap your code withing startTask and endTask as shown in example. And you have to do it for every location you received. So yes, you have to call them everytime.

@shaikhussian
Copy link
Author

shaikhussian commented Nov 15, 2017

@mauron85 i need to call every time or automatically it will call when location changed?
and i am getting some notifications from plugin i don't want those notifications how can i stop those

@shaikhussian
Copy link
Author

@mauron85 please respond

@shafiqshams
Copy link

@shaikhussian did you find any solution?
I am having the same problem.
Even I turned off the debug to false but still getting these beep noises.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants