akoscz / YouTubePlaylist

A sample Android application which demonstrates the use of the YouTube Data v3 API.
Apache License 2.0
153 stars 84 forks source link

PlalistThumbnail gives null #26

Open rplabon opened 6 years ago

rplabon commented 6 years ago

`new GetPlaylistTitlesAsyncTask(mYouTubeDataApi) { @Override protected void onPostExecute(PlaylistListResponse playlistListResponse) { // if we didn't receive a response for the playlist titles, then there's nothing to update if (playlistListResponse == null) return;

        mPlaylistTitles = new ArrayList();
        for (com.google.api.services.youtube.model.Playlist playlist : playlistListResponse.getItems()) {
            mPlaylistTitles.add(playlist.getSnippet().getTitle());

            Log.e("Titile", "" + "" + playlist.getSnippet().getTitle());
            Log.e("Thumbnail", "" + "" + playlist.getSnippet().getThumbnails().getDefault().getUrl());
        }
    }
}.execute(mPlaylistIds);`
rplabon commented 6 years ago

playlist.getSnippet().getTitle() gives the Title... but Why playlist.getSnippet().getThumbnails() gives null. How can I get Thumbnail of a particular Playlist