I have an alert dialog like this
If we pressed the positive button, the program will run the yesListener and run the noListener if we pressed the negative button.
What i want is, if the program met certain condition, the alert dialog will show, and program automatically pressed the positive / negative button.
I don't want to access the method directly, because i want the dialog to be shown first... (it's done as if human pressed the button).
Is it possible?