0

I am doing map application in Android with polling functionality - i.e. I have webservice which giving customers current lat/lang position.

So I need to show it on map with marker. For that I need to call web service every 30 seconds and get current lat/lat values and display it on the map. I have tried timer but the entire page is getting refreshed so my screen flickers. I need to update lat/lang position alone - not the entire screen. Can anybody guide me in this? Examples are much appreciated.

Thanks.

4

1 回答 1

0

您需要使用推送消息而不是轮询。这是处理地图上移动实时更新的低效方式。每当您更新客户的(纬度,经度)时,您需要推送到设备并要求设备更新其在地图上的标记。

安卓推送消息

于 2013-04-22T09:47:26.277 回答