How to Store Location information every 15 minutes in sqlite db & send to Server?

佐手、 提交于 2019-12-04 20:38:42

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.

user370305

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?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!