There might be an easier way I can’t think of but one way is to implement it yourself. On onResume()
you set a member variable mIsRunning
to true and on onPause()
back to false. Using this boolean you should know not to call alert.show()
on your callback.