I need to work Location API for android where first the data is to be stored on Local Sqlite datbase in android itself each 15 minutes and then send it to a server, so that data can be tracked offline too.
Any suggestions, code or help is really appreciated !
You, can simply create a background service then implements a location listener. In that location listener, you can set the time interval in the requestLocationUpdate
method to ping the GPS at particular time intervals. or you can use timertask to send gps at particular intervals
Here is a location manager instance:
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, timeinterval2, 0, locationListener);
You can send that location to the server from the service. You can also send notifications to launch the app.
This question is many time asked in SO,
Use Alarm Manager and Service
for this,
And go through this question
How can i send latitude longitude of android device every 15minute to php web service and How to get gps coordinates every minute in Android?