How to set scheduler for android
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.
精彩评论