How can i send latitude longitude of android device every 15minute to php web service

后端 未结 2 1713
南旧
南旧 2020-12-18 11:36

I want to send every 15minute updated latitude and longitude of android device to php web service. How can i do this?

2条回答
  •  隐瞒了意图╮
    2020-12-18 12:35

    For sending lat, long to webservice I think you can use either service or any thread in which you put the timer for every 15 minutes from device time and at that point just fetch the lat,long and send it to the your web service.

     locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);
    

    from this method you get the update at specified time interval and frequency.

    Here is the Android Location Manager link try it.

提交回复
热议问题