As far I understood your question. Correct me if I am wrong.
The app launches Home activity (button enabled)-> button click of Home Activity -> open game Activity -> when you come back from game activity -> home activity button should be disabled for 3 min (button disabled).
so you want the home activity button should be disabled when are you coming back from the Game activity right? If yes
mHomeActiviyButton.enabled = false
val intent = Intent(this, GameActivity::class.java)
startActivityForResult(intent) // as startActivity for result is deprecated use new one but logic remains same
In-game activity :
val intent = Intent()
intent.putExtra("DisableFor3Minutes",3) // you can customize time
setResult(intent)
enter code here
override onActivityResult function
In home activity :
val time = intent.getString("DisableFor3Minutes")
Handler(Looper.getMainLooper()).postDelayed({
mHomeActButton.enabled = true
}, time)