I'm developing an app that tracks the movement of public transport (buses and trams). I'm doing both, client and server side. The client requests the position of a bus from a server database and the server side is just a simple app that should send the current location to this server database every, lets say, 10 seconds for example.
Don't think about performance nor batery life, it doesn't matter. The important app is the one at the client side, the server side is just a simulation as how it should be in case we had real gps installed in every vehicle. So forget about batery life on server side.
I've read that there is a time interval limitation on Android to get location through network provider, and this limitation is set to 45 seconds min. Is it possible to skip this limitation in any way? Would it be better to use the phone GPS to achieve this task?
Regarding the database, I just store an ID (autoincrement) as primary key, latitude, longitude, and a timestamp.
I thought also about listening changes on location, and when there is a change, add a new entry to my database. If I want to check the position from the client side, I will look for the last entry with a timestamp equal or less than the current one. But if the limitation is set to 45 seconds, this approach won't help me either.
Thanks in advance.