akoscz / youtubeplaylist Goto Github PK
View Code? Open in Web Editor NEWA sample Android application which demonstrates the use of the YouTube Data v3 API.
License: Apache License 2.0
A sample Android application which demonstrates the use of the YouTube Data v3 API.
License: Apache License 2.0
I have been change the Apikey.java but force close .
Maybe i have to change this code too ..
public class YouTubeActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.youtube_activity);
if (ApiKey.YOUTUBE_API_KEY.startsWith("YOUR_API_KEY")) {
AlertDialog.Builder builder = new AlertDialog.Builder(this)
but when i change ..it still ERROR .till now ...so sad :(
Type when opening the Navigation Drawer click on the playlist option and change the videos, can not understand the code
Process: com.sensentouch.playyoutube, PID: 13054
java.lang.NullPointerException
at com.package.playyoutube.YouTubeRecyclerViewFragment$1.onPostExecute(YouTubeRecyclerViewFragment.java:99)
at com.package.playyoutube.YouTubeRecyclerViewFragment$1.onPostExecute(YouTubeRecyclerViewFragment.java:94)
at android.os.AsyncTask.finish(AsyncTask.java:632)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5299)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
at dalvik.system.NativeStart.main(Native Method)
I used firstly Android API KEY then i found it works on Browser Key But when i even used Browser key it still gives me same error Please can you help me out
All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com/r/tools/flavorDimensions-missing-error-message.html
will this work with a youtube channel url ??
Hey,
As everyone, I get black border on the top and the bottom.
The trick to not have any distorsion when pics loading is to use a default video thumbnail with the same borders.
Do you know how to get rid of the borders on the thumbnails ? Does it comes from Picasso ? The size ?
Thanks in Advance.
I have imported your project in my my project, also changed my api key...
Even playlist is being fetched but after fetching playlist name, nothing happens.
I am not getting the list of videos in particular playlist.
Kindly Help
Hi
I've been searching for something like this and it's is working like a charm. Than you for your great work. However I want to take a step forward and show my items in a gridview. That's done but I want ,by defaul, to set focus on the first cell (item) in the list. and whenever you click on the item (and NOT the imagethumb) the url gets open.
I tried a lot and everytime I do it something strange happens. I would appritiate if someone could give me a hint .
Thanks in advance
Hi. This is amazing! I'm wondering if there is a way to get viewCount and/or likes from YouTube?
Also, how do I remove the green bar to the right of the image?
I use your code to my app, and add spinned menu on top of recyclerview. Each menu have different value/playlist id, I successfully load the data from that API playlist. But the weird thing, when I select second/third option from spinned menu, the result of recyclerview is new data placed on bottom layout, I have to scroll it up to view the result. Any solution for this? Or why this is happen? Much appreciate for your help and thanks for the code.
I am getting this error from server when trying to access Youtube API.
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code": 403,
"errors": [
{
"domain": "usageLimits",
"message": "The Android package name and signing-certificate fingerprint, null and null, do not match the app restrictions configured on your API key. Please use the API Console to update your key restrictions.",
"reason": "ipRefererBlocked",
"extendedHelp": "https://console.developers.google.com/apis/credentials?project=796104768654"
}
],
"message": "The Android package name and signing-certificate fingerprint, null and null, do not match the app restrictions configured on your API key. Please use the API Console to update your key restrictions."
}
I get the run-time error , please let me know how I can resolve it
E/AndroidRuntime: FATAL EXCEPTION: main
Process: ca.genesissoft.tarlespeech, PID: 22458
java.lang.RuntimeException: Unable to start activity ComponentInfo(YoutubeActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ProgressDialog.show()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
....
....
I/Process: Sending signal. PID: 22458 SIG: 9
Application terminated.
Hi i am running your app on my device and using my api key it force closes and has this error in the lines:-
FATAL EXCEPTION: main Process: com.akoscz.youtube, PID: 27594 Theme: themes:{} java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.google.api.services.youtube.model.PlaylistListResponse.getItems()' on a null object reference at com.akoscz.youtube.YouTubeRecyclerViewFragment$1.onPostExecute(YouTubeRecyclerViewFragment.java:98) at com.akoscz.youtube.YouTubeRecyclerViewFragment$1.onPostExecute(YouTubeRecyclerViewFragment.java:93) at android.os.AsyncTask.finish(AsyncTask.java:651) at android.os.AsyncTask.-wrap1(AsyncTask.java) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5461) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Can you provide solution to this error?
Update :- I learned from one of the issues from your profile that the app needs browser key please update your readme.
What does it stand for and where do I remove it?
hi akoscz,
i want to add comment and subscribe a channel in android app . how is it possible guide me and inbox me on [email protected]
Great code. Amazing work. Decent Sharing.
I have a playlist in which I do have around 100 of Videos, and all the Videos belongs to the different - different Channels, What code we need to write If we want to fetch name of Channel as well and if possible so Channel Image too... (otherwise Channel name is enough for now).
Here is the Playlist URL: https://www.youtube.com/playlist?list=PLkcOr7MC8c9fb6N38SPb7QDaBHadIbbbi
Thanks. I hope you already done this kind of work in past. Please update and share required code with us.
I found the example very cool, I just wanted to know how to change to vim the last ones added in the playlist
Hello,
First, thank's for your project. I want to know if it's possible to take only the last video of a playlist ?
Thank you
I want it to show a ProgressBar loading and when it loads it disappears
{
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Required parameter: part",
"locationType": "parameter",
"location": "part"
}
],
"code": 400,
"message": "Required parameter: part"
}
thats the error I got. and I have an api key working. any Idea?
Hi. Im novice in Java. And I want to ask you know how can I view videos inside Android app and make it fullscreen after play-click.
Fixed --
// set the Picasso debug indicator only for debug builds Picasso.with(getActivity());
`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);`
Would you please provide some more details about this issue.
Also, did you follow the setup instructions regarding the API key?
https://github.com/akoscz/YouTubePlaylist/blob/master/README.md
May I know how to get PLAYLIST_KEY in YoutubeFragment.java ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.