title: YouTube Api for android exception "service_missing"
body: <p>I want to play you tube video in my android application</p>
  
  <p>I got exception while youtube initialization like "service_missing".</p>
  
  <p>I write following code,</p>
  
  <pre><code>package com.example.youtubedemo;
  import android.os.Bundle;
  
  import android.view.Menu;
  import android.widget.Toast;
  import com.google.android.youtube.player.*;
  import com.google.android.youtube.player.YouTubePlayer.OnInitializedListener;
  import com.google.android.youtube.player.YouTubePlayer.Provider;
  
  public class MainActivity extends YouTubeBaseActivity implements OnInitializedListener{
  
      static private final String DEVELOPER_KEY = "MY API KEY";
  
      static private final String VIDEO = https://www.youtube.com/watch?v=d6XXgeAkBfQ&amp;list=PLWz5rJ2EKKc9Wam5jE-9oY8l6RpeAx-XM";
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          YouTubePlayerView youTubeView = (YouTubePlayerView)
                  findViewById(R.id.youtube_view);
          youTubeView.initialize(DEVELOPER_KEY, MainActivity.this);
      }
  
  
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
  
  
      @Override
      public void onInitializationFailure(Provider arg0,YouTubeInitializationResult error) {
          Toast.makeText(this, "Oh no! "+error.toString(),Toast.LENGTH_LONG).show();
  
          Toast.makeText(this, ""+YouTubeInitializationResult.SERVICE_MISSING,Toast.LENGTH_LONG).show();
      }
  
  
  
      @Override
      public void onInitializationSuccess(Provider arg0, YouTubePlayer player,
              boolean arg2) {
          player.loadVideo(VIDEO);
  
      }
  
  }
  </code></pre>
  
  <blockquote>
    <p>I had also given INTERNET users permission.</p>
    
    <p>I test this code in 4.2.2 With google API AVD.</p>
    
    <p>android:minSdkVersion="8"</p>
    
    <p>android:targetSdkVersion="17"</p>
  </blockquote>
  
  <p>Any one have any idea??</p>
  
  <p>thanks in advance...</p>