title: Android: Youtube API playlist
body: <p>I've been doing an apps that using YouTube API in my project. I had tab that represent 3 tabs. First channel tab, second top video and finally fav video. I want to use the standalone YouTube but somehow it cannot display the video for each tab. So, i test the code in the top tab first and it give this error  "ERROR_CONNECTING_TO_SERVICE". Please help me. Thanks :)</p>
  
  <pre><code>/import android.app.Activity;
  import android.os.Bundle;
  
  import org.brickred.socialshare.YouTubeFailureRecoveryActivity;
  //import com.google.android.youtube.player.YouTubeBaseActivity;
  import com.google.android.youtube.player.YouTubePlayer;
  //import com.google.android.youtube.player.YouTubePlayerFragment;
  import com.google.android.youtube.player.YouTubePlayerView;
  import com.google.android.youtube.player.YouTubeInitializationResult;
  
  
  public class Top extends YouTubeFailureRecoveryActivity {
  
          public static final String PLAYLIST_ID = "PLC7961A4662BB1042";
          /** Called when the activity is first created. */
  
          @Override
          public void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
  
              setContentView(R.layout.top);
  
              YouTubePlayerView youTubeView = (YouTubePlayerView) findViewById(R.id.youtube_view);
              youTubeView.initialize(DeveloperKey.DEV_KEY, this);
          }
  
          @Override
          public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer player,
              boolean wasRestored) {
            if (!wasRestored) {
              player.loadPlaylist(PLAYLIST_ID);
            }
          }
  
          @Override
          protected YouTubePlayer.Provider getYouTubePlayerProvider() {
            return (YouTubePlayerView) findViewById(R.id.youtube_view);
          }
  }
  </code></pre>