I want to track the real time movement of a car. Should I get it's position, send it to the server, and immediately get the position again and so on? What would be your recommendation as a best practice?
3 Answers
I would not send it to your server everytime it was updated. Personally, I would save the data locally, via local database, or an array, and send them at specific intervals (every 5 minutes or once the array hit 100 elements, etc).
Its usually best to grab the location at intervals like 30 - 60 seconds due to battery consumption. Don't try to make it run forever in the background for the same reason.
there is an event you can listen to.. it is called something like 'significatlocationchanged'. It will be implement in the next sdk update.
Your Answer
Think you can help? Login to answer this question!