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.
精彩评论