开发者

Android sending a http request every minute to server? repeating a task?

开发者 https://www.devze.com 2023-04-12 02:02 出处:网络
I want to send a request to the server every minute, Basically I have method and needs to be run every min to send to server some query. what is the best way of doing this? I have searched on the inte

I want to send a request to the server every minute, Basically I have method and needs to be run every min to send to server some query. what is the best way of doing this? I have searched on the internet and couldnt find a straight forward solution to this. I tried to use timer and timertask classes but it didnt work. I also found something about AlarmManager people say AlarmManager is the best way of doing this but I dont know how? could you direct me a sample application or if it is easy could you send me a s开发者_开发知识库ample code here. also I look forward to your opinion about this.

Thank you


Use the Service facility

0

精彩评论

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