subcribe to channel and like/dislike youtube video programmatically android - android

How to achieve from an android application which can subscribe, like or dislike a particular youtube video from android application side. And yes this is not so far, i also want callback for all of them like once user has like video then i want callback of that, too. I have searched and got some idea about YouTube Data API,but how to integrate it in my own app that is what i am confused. And is there any else way to achieve this, if someone have then kindly let me know.

To get ratings (like or dislike) you have to to take the video_ID and make a separate API request to get the details you want for the video.
Here are some of the Listener, you may use this specially for loading, playing and controlling video callback: https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubePlayer#Overview
You may use the 'Get Started', The document will help you to set up your development environment and use the Youtube Android Player API.

Related

How to play YouTube video in react native Android app without YouTube branding?

We want to play some YouTube videos in my React Native app without YouTube branding. We would like to give the user experience as if the video is playing in a native player. We already tried with webview, react-native-youtube-iframe but still, we are not able to achieve our goal. Either top or bottom section has a YouTube logo, then watch and share options are visible. We want to eliminate those. Any possible way to do this in React Native?
URLs of Youtube videos are different for normal videos and embedded videos.
Normal: https://www.youtube.com/watch?v=DGQwd1_dpuc
Embed: https://www.youtube.com/embed/DGQwd1_dpuc
Please change 'watch?v=' with '/embed/'.
You can also hide controls and information by passing 'showinfo=0' or 'controls=0'.
I recently tried to achieve the similar thing in one of my android app if you can somehow use this particular library
This is an android library and as you mentioned you want to do it in android.
android-youtube-player
I have used this library where i used a player with custom control which helps you override the controls and also this share and next button and even the youtube logo.
Let me know if you need any help further.
Edit:
To enable web UI
IFramePlayerOptions options = new IFramePlayerOptions.Builder().controls(1).build();
Then initialize the player with this controls.
You won't see any logo now.

Implementing video chat and message chat at once android

I have done a lot of research, but couldn't find the answer. Currently I'm using agora.io.
What I mean :
I want to add into my android app voice call, but on the same screen.
It has to be possible write some messages during a call without ending it, like at this screen
Is it even possible to do it with agora.io or should I change the lib to another one?
Agora video sdk can achieve that. You can use RTM sdk for messaging functionality and RTC sdk for video call. To put them in the same screen, you need to put the video ui on top of the messaging ui.

Implementing youtube bookmarks app on Android

I'd like to implement bookmarks app allowing to save a bookmark for a particular moment in a youtube video so that it would be possible to jump back to the given second of the video.
I'd like it to be seamlessly integrated with the native youtube app. Is it possible to create a transparent layer on top of youtube app so that I could add this kind of functionality? I mean kind of button in the corner of the screen allowing to save the exact moment of the video. To do that I need to know what youtube video is being watched and what is the moment? Is it doable?
I have no experience with android development, but I'm a skilled Java programmer.
This is a link to a youtube video which takes you directly to a certain moment in the video: https://theyoutubevideolink?t=36m42s (Note everything after ?)
This also works on the current Android YouTube App you can click on the link and it will directly take you to the moment. So it is possible to simply save that link to an external overlay/database.
But before thinking about that you understand Root permission is needed to be able to do this as an overlay. If you are fine with this, it is doable there are many open source YouTube apps with changes made to them on XDA Developers for example, and a simple database addition can the trick for this.
[EDIT]
Well I just went on the YouTube app and you cant hold a time-link like for example on LinusTechTips new video on mobile if you scroll down to the comments you will see many comment showing 0:55 which if you click on can take you directly to that moment in the video. Because we cant hold or anything else than just click, You will need to re-write so you can highlight etc.. which is why i mentioned before about having root access since you cant install third party YouTube apps it has to be re-written and just made into another app. To start you off check this re-written YouTube app called SkyTube: https://github.com/ram-on/SkyTube

Is there any way to disable "Watch Next" block at the end of video using YouTube Android Player API?

In my app I'm using YouTube Android Player API library from here https://developers.google.com/youtube/android/player/
I have a fragment that extends YouTubePlayerFragment. All works fine, but I need to make some improvements to app.
At the end of some videos I see block "Watch Next" with the link to another video, so I'm curious - does we have a possibility to disable this feature?
I created another solution using WebView, and display video using it - in this case I'm able to turn off any other additional links using "rel=0" in video url, but I want to use native solution.
Any ideas?
Thanks in advance!

VideoView vs Intent.action_view of user choice

I want to play video in my application, but now am confused in different approach to play video in android. Android itself has a feature "VideoView". Shall I implement this videoView or use an Intent.action_view to open the video in the existing player.
I want to know the best approach to follow and the pros and cons of videoView ?
Please guide me!!
Well the best practice, generally, is to use Intent system as much as you can to avoid additional overhead required to implement them yourself when there could, possibly, be better alternatives and to provide users with additional choice. But there might be cases when there is no application available for the required action and hence you'll be needing to implement the task yourself.
My advice is use the intent system, and if no apps were found in user's handset for video playback then you can use VideoView in that case.
No one can tell with out your purpose
1) Based on your requirement you have to choose which one is suitable
2) If you want's to open current video in your own application , you have to use Video view and to Implement controls for Video view , you should use MediaController class
actually this is like createing small video view with minimal options .
3) instead of creating Custom video view you can play selected video using Action.View , but that some of Video player should have in your device .here your opeing in your video in other application , depends on that application you can show more options for video accessing .
Well, there is no right or wrong way here.
It really depends on what you want to do. If the user of your app should only be able to watch the video and your app doesn't need to interact in any way during the playback or needs any information about whether or how the user watched the video, then an intent would probably suffice. And it's less work.
If you want to provide any additional features during the playback a VideoView would be better (and it's really not that much work to implement a simple videoview). Also with an intent you don't know what app the user will choose to open the video, so you have no guarantee how the user will experience your video...
If you implement your own video view you have full control, how it works and how it looks.
So if it's not the core functionality and you only want to show a video once or so, an intent is probably a good way. If it's an important part of your app and you might want to add features and if it would be a bad experience for the user if s/he chose a bad video player, I would definitely recommend doing the little extra work and impl your own video viewer activity...

Categories

Resources