A bit long reply but or works for me
Best way I found is a set of periodic actions and rectification when pressing the button in wrong place or time
- assume ad is running and when
you press X early or in a wrong place
One of the following happens
The screen rotation changes from horizontal to vertical
Or a browser app is launched, or playstore launched
The needed fix is simply pressing back once or twice to get back to the add or the app
So I simply create macro to touch all possible ad close points in sequence
If the ad is on good, ad closed
Otherwise, the macro clicks in wrong place one of the above 3 actions happen (browser app or playstore launched, or screen rotation change) macro druid presses back
Based on ur phone and app you might need
1) to add one or 2 conditions more that trigger the "back" action
2) when u click in the app and no ad on, it can take u to some unwanted place
It could cost u some more clicks to return back
I use clickmate app for the clicks and macdroid for rectification