Skip to content

Instantly share code, notes, and snippets.

@fnzainal
Created December 2, 2015 02:34
Show Gist options
  • Save fnzainal/7bbdecc31cc5d2486c61 to your computer and use it in GitHub Desktop.
Save fnzainal/7bbdecc31cc5d2486c61 to your computer and use it in GitHub Desktop.
example using Timer android
Timer timer = new Timer();
@Override
public void onCreate()
{
timer.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
CallMethod();
}
}, 0, 24 * 60 * 60 * 1000);//repeat every 24 Hours
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment