title: How to retrieve details of single video from youtube using videoID through Data API v3.0 in Android?
body: <p>My server sends the list of videoID to Android. Now, I want to show Title, Thumbnail and Number of Comments on these videos in List View. I have done this in web using GET request to <code>https://www.googleapis.com/youtube/v3/videos?part=snippet&amp;id={VIDEO_ID}&amp;key={YOUR_API_KEY}</code> but how to do this in Android? Is there any YouTube SDK to initialize YouTube object? How do I retrieve this information from YouTube using VideoID?</p>
  
  <p>EDIT: I have found a way to this using <a href="https://developers.google.com/api-client-library/java/apis/youtube/v3" rel="noreferrer">YouTube Data API Client Library for Java</a> but It is giving runtime error without any explanation.</p>
  
  <p>Here is the code I used </p>
  
  <pre><code>/**
   * Define a global instance of a Youtube object, which will be used
   * to make YouTube Data API requests.
   */
  private static YouTube youtube;
  
  youtube = new YouTube.Builder(new NetHttpTransport(), new JacksonFactory(), new HttpRequestInitializer(){
          public void initialize(com.google.api.client.http.HttpRequest request) throws IOException {
          }
      }).setApplicationName("youtube-cmdline-search-sample").build();
  
  // Call the YouTube Data API's videos.list method to retrieve videos.
      VideoListResponse videoListResponse = youtube.videos().
          list("snippet").setId(videoId).execute();
  
      // Since the API request specified a unique video ID, the API
      // response should return exactly one video. If the response does
      // not contain a video, then the specified video ID was not found.
      List&lt;Video&gt; videoList = videoListResponse.getItems();
      if (videoList.isEmpty()) {
          System.out.println("Can't find a video with ID: " + videoId);
          return;
      }
      Video video = videoList.get(0)
      // Print information from the API response.
  }
  </code></pre>