Created
May 26, 2014 11:18
-
-
Save gvsharma/f60f89970f07708bb580 to your computer and use it in GitHub Desktop.
code snippet to do a task repeatedly using timer in android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timer = new Timer(); | |
timer.schedule(new TimerTask() { | |
@Override | |
public void run() { | |
getActivity().runOnUiThread(new Runnable() { | |
@Override | |
public void run() { | |
fetchallMessages(match_id,true); | |
} | |
}); | |
} | |
}, 0, 30 * 1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment