Mauricio Ramos Mauricio Ramos - 3 years ago 90
Android Question

How to load information every minute in android?

I am making an app that shows the results of soccer matches live, I am making a request json format with the library volley and let me know if you can make that request every minute. Any method seemed to setInterval in javascript

Answer Source
private final static int INTERVAL = 1000 * 60 * 1;
Handler mHandler = new Handler();

Runnable mHandlerTask = new Runnable()
    public void run() {
         mHandler.postDelayed(mHandlerTask, INTERVAL);

call; whenever you want to start the task and replace doSomething() function with your volley request code.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download