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.
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'm trying to find out if there are any examples how to play 3D video for cardboard in android. I have a 3D video and need my app to play in cardboard. I'm not sure if the SDK has support and couldn't figure it out as there is very less documentation.
It is not very easy. I think the problem is not about Google Cardboard, but about Unity itself. It is not easy to add any kind of video to Unity. If you are able to open a normal video within the Unity game, I think that 3D video will work too.
Check the docs about how to configure it for Android: http://docs.unity3d.com/es/current/Manual/class-MovieTexture.html
I tried to add a video to an older version of Unity. Unity crashed. I did the conversion manually. I wrote the explanation here: http://answers.unity3d.com/questions/997663/unity-video-import-bug.html
I think this:
Google Cardboard SDK (Software Developement Kit)
Will help you to build apps that display 3D scenes with binocular rendering, track and react to head movements, and interact with apps through magnet input.
also you can easily adapt an existing Unity 3D app for virtual reality or build your own VR experience from scratch.
Thanks for all the answers. For me only solution that worked is to use that is described at HERE. Had to Use unity with a plugin to play video on movietexture.
Without using the unity plugin Easy Movie Texture plugin I couldn't find any easier solution.
Me and my friends are trying to work with Google Glass. We need to know whether the google glass app can be created without a card.
Yes, you can. You can use the Glass Development Kit (GDK), an add-on to the Android SDK. See https://developers.google.com/glass/develop/gdk/.
The GDK is harder to use than the Mirror API, since you'd be writing an Android app, but it is also much more powerful than the Mirror API.
Well you can create a software to run on any of the OS if they're having an API. Because API is required to understand how the OS would perform a task.
You can try out https://developers.google.com/glass/develop/gdk/ from the Google's Developer Network. They would train you in a better way.
And I am not able to understand the card part where you're trying to imply that you want to create the app without a card.
To create an app that would have more control over the Glass's hardware you can create the App using the GlassAPI (GDK). It is more like a low-level app.
On the main page, you can find out that the Glass would also use the .apk files that are used to install the application softwares on Android OS. So, coding in Android SDK and then installing the very same app on the Google Glass would also be a good idea.
Is it possible to define an Android Virtual Device for use to develop Google Glass apps (until the devices become widely available)?
There's no official Glass Emulator yet.
I overcame this via installing Glass APKs into Nexus 7 tablet.
It worked perfectly:
I can control it in http://google.com/myglass
Mirror API works flawlessly.
GDK Sneak Peak doesn't work.
I described all the required steps here:
http://www.elekslabs.com/2013/11/google-glass-development-without-glass.html
There isn't an out the box emulator.
You can use the playground to preview your cards, this will show you how your card will be laid out depending on what attributes you provide in your timeline post object. On the right. Just switch that view on the right to HTML if you want to provide a custom HTML template for your cards.
Yes you can.. Use your phone as google glass.
http://pathofacoder.com/2013/07/19/installing-google-glass-in-an-android-phone/
here are infos about an available emulator for people without google glass
google glass emulator
and a project on github
Scarigami Mirror API
As a matter of fact, I just saw an Engadget article (this morning I think) that announced that the Google Glass API is now live
Additional links from the Engadget article:
https://plus.google.com/+GoogleDevelopers/posts/cwWuUY6xYKW (Originaly announced on)
https://developers.google.com/glass/ (The ACTUAL Link to the API) :-)
However, as the developer site lists, there is nothing specific for Android. :-(
(Source: https://developers.google.com/glass/downloads/)
The supported platforms at the moment are:
Java
Python
Go
PHP
.NET
Ruby
Dart
I've been digging the docs all this morning and as far as I understood, you can see what type of code/objects would be sent to the Glass using the same code on the example https://glass-java-starter-demo.appspot.com/ (code available here https://github.com/googleglass/mirror-quickstart-java )
But an actual emulator that you can see how what the Glass screen would be showing, not really.
There is an Unofficial Mirror API that tries to reproduce the behaviour of glass device with the existing Google API's.
you can check it here. I have not tested it yet.
http://glass-apps.org/google-glass-emulator
According to google, Glass has to be treated as a unique platform. And the apps developed for glass are called as Glasswares. And they're all almost web-based services which are hosted in GAE. Official statement says,
The Google Mirror API allows you to build web-based services, called
Glassware, that interact with Google Glass.
Of-course glass runs on ICS Android 4.0.4 which doesn't mean you can develop glasswares as much as like developing android apps. You need Google's Mirror API to sync data between your glass and glasswares.
And as of now, it's in explorer state and only developers and explorers who has google glass are having access to Mirror API. But as #infoman answered, you can use the Scarigami Mirror API and playground can be acting as your emulator.
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.