title: Android YouTube API video pause when rotate screen or hide player
body: <p>I'm using the YouTube API for Android. The video is playing normally but when I turn the screen, the player stop the video and it comes back from the beginning as if it had not been played. The same happens when scroll the screen and hides the player. I've researched a lot about and also got to test some things I found but nothing worked =(</p>
  
  <p>This is the way that i declared my class:</p>
  
  <pre><code>public class PlayerTest extends YouTubeBaseActivity implements
      YouTubePlayer.OnInitializedListener {
  </code></pre>
  
  <p>This is what i put into onCreate():</p>
  
  <pre><code> YouTubePlayerView youTubeView = (YouTubePlayerView) findViewById(R.id.youtube_view);
      youTubeView.initialize(DEVELOPER_KEY, this);
  </code></pre>
  
  <p>and this is the methods what i implement:</p>
  
  <pre><code>@Override
  public void onInitializationFailure(Provider provider,
          YouTubeInitializationResult error) {
      Toast.makeText(this, "Error :( " + error.toString(), Toast.LENGTH_LONG)
              .show();
  }
  
  @Override
  public void onInitializationSuccess(Provider provider,
          YouTubePlayer player, boolean wasRestored) {
      player.cueVideo(video);
  }
  </code></pre>
  
  <p>question:</p>
  
  <p>I want the video continue playing while scrolls or flips the screen. Is this possible?
  I'm implementing the right way? If not, what would be the best way?</p>
  
  <p>Thank you in advance for help!</p>