I am trying to make an Android app which will pull uploaded videos from a channel and display them in a list view. Users will be able to watch videos, subscribe to the channel, comment, and like videos.
I have looked at using an Atom feed to get the video info from YouTube (I have a working app), but I came across the Java API for YouTube today, which abstracts all the parsing that's needed, if I implement the REST client code myself.
My question is which is the recommended solution for this? And which will perform better?
for sure " DON'T INVENT THE WHEEL ! "
I build smaller application for android and believe me using YouTube API is much better than anything else.
if you are seeking to play videos inside your Application try to see also Open-Youtube-player !
also you should use the API for other features and for its performance you don't need to add more leakage to your application you need it fast and light.
Related
I am planning on having a YouTube player in my android app and found two alternatives: IFRAME API or with YouTube Android Player API. So far I don't find any reference for comparing the two approaches.
I am new to both so I don't have a good background to compare both (yet). But so far this is what I know:
IFRAME
Pro: Don't need to get Developer/App Key to access the API.
Pro: Don't need to include YouTubePlayer API's jar (don't increase your APK size)
Con: Unnecessary webview and javascript glue code to hook up
YT Player API:
Pro: Native Java, no need of javascript glue code
Con: Need YouTube app on the device
Con: Need to get Developer/App Key and need to include the API jar to your APK.
Playing with both, I don't know yet any perf/memory usage between the two. I also don't know if we can have more detailed events from the API vs through IFRAME.
I am trying to assess these but would like to hear if any of you have opinions on these.
Thank you
Here you can find a few reason for not using the YouTube Player API.
Overall I'd say: if need to do basic stuff (like using YouTubeBaseActivity/YouTubeStandalonePlayer) you can safely use it. If you need to use the YouTubePlayerFragment a WebView based approach may be a better idea.
Why should you consider not using the official library from YouTube?
If you’re concerned about stability:
The YouTube Android Player API is not the best API ever designed. You are probably going to be fine if you need to use the
YouTubeBaseActivity/YouTubeStandalonePlayer, but you’re going to run into issues with the YouTubePlayerFragment.
The library has some very old bugs, this one is the most significant I have encountered. While developing my app I kept running into it, seeing my app randomly crash for apparently no reason. It made my app unstable and never ready for production.
The bug is still there, as far as I know. A new version of the library should be in the making, but it has yet to be released.
If you don’t want to be tied to Google Play and the YouTube app:
In order to run an app that utilizes the YouTube Android Player API a device needs to have both Google Play and the last version of the YouTube app installed.
This may not be a limitation in most cases, since you’re probably going to distribute your app through Google Play. But I have talked with people that had this problem, maybe you care about it as well.
If you want more control over the player looks and behavior:
The YouTube Android Player API is not open source, therefore the customization you can do goes as far as the API allows to. Maybe you want to change the UI of the player or write some custom behavior specific for your use cases. That is going to be hard to do with the official library.
If you don’t want to register your app in the Google Developers Console
I was reading several tutorials about how to use the Youtube Api. Just to find out after I implemented it. That it was not working when the original Youtube App was not installed on device. In the tutorials I read this was not mentioned. Just in original doc's it says:
The API client library interacts with a service that is distributed as a part of the YouTube app for the Android platform
If that is the case I think it is an exclusion criterion. Cause it forces the user to install another 20mb sized app.
So my question would be if there is another way to play youtube Videos.
One possibility is to use HTML5 player in a web-view. But It may have compatibility issues with older android OS and experience may vary from device to device.
In the latest update to Glass, Google dropped the Hangouts feature. Since the Glass development kit is fairly new does anyone know of any API available to do a video chat using Glass?
Any inputs will be appreciated. At present I am planning to use SIP as done in Android. Can the same be applied to Glass?
This is what they said on the Google + page:
Video calls – We hold ourselves to high standards for the features
that we build, and video calls aren’t living up to these standards.
Explorers have told us so directly, and fewer than 10% of them use
video calls. For this reason, we’ve made the hard decision to remove
video calls from Glass until the experience is better. We don’t know
when that will be, but in the meantime, keep an eye on MyGlass as more
Glassware is built and released – we’re already seeing the developer
community work on other video streaming services. We’ve always said
that feedback from Explorers shapes Glass, and this is no exception.
I think your SIP approach is the way to go for now.
How to do live streaming in google glass through android code, i am using eclipse IDE to develop android apps. I have downloaded GDK and created the project using GDK. I have browsed for live video streaming, i didnt get any blogs related to that(i dont know how to use Mirror API to do live streaming )..Can anyone helped me to go up?
If you're using the GDK, then you can just use the standard android VideoView or MediaPlayer. It's explained pretty well in the Android API Guide. http://developer.android.com/guide/topics/media/mediaplayer.html
You probably want to build and test this in Android first (a phone or emulator). That should be faster since it's easier to interact with the touch screen. Once you have that working you can load it onto your Glass and proceed from there.
As far as I know there isn't a way to do this with the Mirror API. Only with the GDK.
Is it possible to intercept audio data using google+ hangout api? I writing an app using g+ hangout for android and I would like to process the audio. To be precessive, I want to denoise speech and use speech-to-text (e.g. google search, sphinx) to make basic voice commands.
Because I have full control of the android app it doesn't matter for me if I will have a callback with audio data from hangout or I can record audio using android AudioRecorder and then somehow forward those data to google hangout (Though the latter solution would be better because we can denoise on the android device). Actually I would be happy with any feasible workaround that may work at this stage of the API.
The Hangouts API is not going to help you develop this feature.
What you need is a platform agnostic API for accessing hangouts data. The API is instead intended to solve a different problem. It allows you to write HTML/JavaScript applications that run inside the canvas of hangouts running on desktop web browsers.
One possible "workaround" that I'm currently investigating, myself—
publish the hangout "on air"
get the youtube live id (available as of 2012-08-22, roughly... since Hangout API 1.2) ~ gapi.hangout.onair.getYouTubeLiveId() https://developers.google.com/+/hangouts/api/gapi.hangout.onair#gapi.hangout.onair.getYouTubeLiveId (note that this can only be grabbed by the host?)
grab http://www.youtube.com/watch?v=${LIVEID} // suggestion: look at youtube-dl: http://rg3.github.com/youtube-dl/documentation.html
and then use ffmpeg to process the flv
Information for this answer was primarily grabbed from Downloading videos in flv format from youtube. and http://grokbase.com/t/gg/google-plus-developers/128fbteedb/google-hangout-api-url-to-youtube-stream-screenshot-and-hangout-topic