android – Run code after 10 seconds

Question:

How to execute some piece of code after a certain number of seconds? In particular, I want a method that displays interstitial advertising 10 seconds after opening the activity.

Answer:

Please don't post bikes.

Everything has been thought of for you

new Timer().schedule(new TimerTask() {...}, 10000);
Scroll to Top