开发者

How to implement to send Data to Server

I want to have a data connection that sends every 60 seconds the geo-position. My problem is how to implement that in my app.

Should i make a service in a endless thread that reads the geo data and send i开发者_高级运维t to my server? Any other solution?


Could use a service and then use of a handler to post a delay every 60 seconds. Using the

postDelayed() method


You can do this by using timertask rather than handler. If you use handler it works only for one time,but if you use timertask it works every interval set by you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜