//Use Looper.getMainLooper() for avoid deprecation warning Handler(Looper.getMainLooper()).postDelayed({ // Your Code }, 3000)
Handler().postDelayed({ //doSomethingHere() }, 1000)