Intro
I'm working in an android app that receives commands through http network commands (not through touch).
What I need to accomplish
I want to be able to, whenever a user instructs via http command that wants to perform a click on the skip add, programmatically instruct the youtube-player (embedded in my app), to skip the add.
Looking to the available functions I only can check if the player is showing the advertising or not, but nothing related to being able to skip it through a method.
How I'm trying to solve it
I'm trying to go via:
- Get all child views and their childs of the activity
- Figure out the view that I need to perform the click
- Perform the click through view.performClick()
My problem is that it rarely shows advertising, meaning that I'm unable to complete the task or even know if this will work in a useful time.
Any ideas that can help to solve the main problem?
Thanks in advance.