I'd like to call the method with a certain delay In Objective C,
[self performSelector:@selector(DoSomething) withObject:nil afterDelay:5];
You do it like this.
What do I do on Android?
public void DoSomething()
{
//do something here
}
If there's a method like this, I'd like to page this in five seconds.
java android handler delay
I think there's a way to use a handler.
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
//Milisecond action desired to delay
}
}, milliseconds that you want to delay);
© 2024 OneMinuteCode. All rights reserved.