title: YouTube Android Player API - Programatically perform a click on "skip ad"
body: <p><strong>Intro</strong></p>
  
  <p>I'm working in an android app that receives commands through http network commands (not through touch). </p>
  
  <p><strong>What I need to accomplish</strong></p>
  
  <p>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. </p>
  
  <p>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.</p>
  
  <p><strong>How I'm trying to solve it</strong></p>
  
  <p>I'm trying to go via:</p>
  
  <ol>
  <li>Get all child views and their childs of the activity </li>
  <li>Figure out the view that I need to perform the click </li>
  <li>Perform the click through view.performClick()</li>
  </ol>
  
  <p><strong>My problem</strong> 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.</p>
  
  <p>Any ideas that can help to solve the main problem?</p>
  
  <p>Thanks in advance.</p>