开发者

How to set scheduler for android

开发者 https://www.devze.com 2023-01-29 21:05 出处:网络
i\'m currently trying to create a service that updates the current location of the person holding the handphone every 10 mins. The service will then send a http post to a server even there\'s no updat

i'm currently trying to create a service that updates the current location of the person holding the handphone every 10 mins. The service will then send a http post to a server even there's no update to the location every 10 mins. I've tried using 开发者_运维知识库scheduleAtFixedRate but there's lots of problem. sometimes it's irresponsive and does not send according to the 10mins, not sure about the reason. Would be glad to have someone to point me the direction of which scheduler to use or any solution to solve my current scheduler which does not work well.


You can use the AlarmManager to do it. http://developer.android.com/reference/android/app/AlarmManager.html.

0

精彩评论

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