开发者

Starting android service with two ways

I have a batch of data to load from web. But I need to initiate loading in开发者_C百科 two ways: 1) Every N minuts 2) Immediately loading by click refresh button

Which is best way to implement this issue? Should I create two services: firs for looping datat loading and second for single loading, or i can combine this functionality into one service or something else?

Thank you!


You can write a single function that loads the data from the web and then write a method that calls that function after a specified time ,and also call the same function on refresh button click event.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜