Coding for Google's Project Glass, is learning Google Android for mobile the way to go? [closed]
Asked Answered
G

4

9

I am excited about the possibilities that come with Project Glass. Based on an article I read on the New York Times, they said it (Project Glass) will be based on the Android software -

The glasses will use the same Android software that powers Android smartphones and tablets. Like smartphones and tablets, the glasses will be equipped with GPS and motion sensors. They will also contain a camera and audio inputs and outputs.

Source: http://www.nytimes.com/2012/02/23/technology/google-glasses-will-be-powered-by-android.html?_r=2

I am a front/back-end web developer by profession. I learnt C++ and Java at university and actually retained this knowledge :). I've pretty much grasped the more advanced concepts of programming so let's skip the basics.

Would gaining experience coding on the Android for phones platform better prepare me for coding on project glass when it comes out?

Gubernatorial answered 28/7, 2012 at 2:3 Comment(2)
"... will use the same Android software ..." So, programming for Android should prepare you for programming for Android.Spyglass
it would seem so at a glance but considering the difference in hardware, i imagine that there could be some difference in programming through android as well...Gubernatorial
W
9

There are two ways to develop for Google Glass. There is the Mirror API that allows to create web applications to the platform. Besides that, an Android based SDK for building native apps was released recently.

The Mirror API is an RESTful API and the development model with it is very different from what we know from Android and even from traditional web apps. The web apps are thick clients that you can run some code on (in the browser). With Mirror API, the Glass device is to your application presented as a web service in the cloud, that you can control by sending queries over the Internet. That control is limited to inserting interactive cards in user timeline and reacting to user interactions with them. Every interaction involves an roundtrip from the device to your server and back. This in a way shapes what kind of applications will be possible with Glass. For instance, it seems you need to be always on-line for the apps to work at all.

It has some benefits also. Most importantly it allows you to write the app in any language that can deal with HTTP protocol, be it Java, Python, actually almost anything even like Haskell. The downside is that the app is not going to be running directly on the Glass device, but on either yours or Google provided computer (think App Engine).

Using the GDK that was released later, you can develop a native Android app APK and run it on the Glass Device. I am not following this closely, but I know doing this was more or less possible since late spring 2013, but then there was no end-user distribution mechanism in place so you had to enable USB debugging and push the APK on the device using the debugging tool. Doing this did not require root access.

With the SDK, you get access to all hardware sensors on the device (camera, accelerometer) and you can create more interactive experiences for your users this way. The negative is that such apps can be probably battery intensive and users can become suspicious towards it.

But to answer your question, experience with designing for Android will be definitely helpful in the general sense. If you think about that, Android devices are in fact wearable computers. The glasses form factor brings that to a whole new level (instead of reaching in your pocket, you have the glasses already prepared for use in front of your eyes), but still there are similarities.

In Android, as in Glass you are aiming to provide the user with access to information, communication or entertainment, taking into account the limitations of the platform, especially limited battery life.

People who will have Glass are likely to be Android users, so another argument may be that you can build on familiar Android experience when making an Glass app. Also, you can target them with your app both on Glass and Android and provide some unified experience when accessing your content. Maybe you even want to use the touch screen on the phone to control some aspects of the Glass app.

Wildlife answered 22/1, 2013 at 20:15 Comment(3)
I changed the link to point to Google Developers site instead to the initial Mirror API announcement video at youtube.com/watch?v=047lMUJMo8YWildlife
Some more information from "Google I/O 2013 - Voiding Your Warranty: Hacking Glass" video at youtube.com/watch?v=OPethpwuYEkWildlife
Google released the GDK developers.google.com/glass/develop/gdkWildlife
R
4

The best way to prepare for development on Glass would be to read the Google Mirror API documentation. You'll find example code and lots of other goodies in those docs.

Realism answered 16/4, 2013 at 1:5 Comment(0)
A
1

Like it is said in the text that you quoted, the answer is yes.

It is possible that the hardware differences and/or other differences make it come with specific APIs for device-specific functionality, but programming for Android mobile devices will most likely help you prepare significantly.

Even if one could think that some functionalities from the glasses could possibly call for an android core API specific to it, the fact is that the Android philosophy in between API levels has always been one of approaching the different devices. Android 4.0 runs nowadays in tablets and smartphones, while before, tablets used to run Android 3.0 and phones would run versions from 1.x to 2.x. So, most likely, what will happen is that the glasses will run the core Android, at a different API level, which might be more different at first, but which will most likely converge to a unified version, capable of working across all devices.

No matter how different that version is from the others, there will most likely be common points, so programming for Android as it is today will always be a benefit and provide you leverage for when the glasses are out with their respective APIs.

Andorra answered 28/7, 2012 at 2:37 Comment(2)
As it turns out, this is not the case - the model is quite different (REST) and not in any way related to the Android API levels etc.Ventriloquism
At the time this question was asked and that I posted my answer, I believe this information was not clear and/or known. In any case, thank you for stating that here, because it will be useful for other people, and also for myself, since I admit I have not been following Google Glass stuff for a while now :).Andorra
S
0

It uses RESTFul ...api so you can use what ever language you like. Thats why google is cool. If you really want to get familiar with it you should learn to program with the other google services not necessary android. RESTful services are language independent.

Shostakovich answered 27/2, 2013 at 5:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.