Hello Google Glass from Delphi XE5

Google’s new Glass platform is a very revolutionary Android device, but the question I really wanted to know is if I could develop for it with Delphi XE5. Turns out the answer is Yes.

There are actually two different options for developing Glassware: Mirror API and GDK.

The first is the Google Mirror API, which allows you to build services, called Glassware, that interact with Google Glass. It provides this functionality over a cloud-based API and does not require running code on Glass. This is accomplished through a REST and JSON based API. Thanks to the new TRESTClient components in Delphi XE5 this should be easy enough to do.

The GDK on the other hand is the avenue where you build an actual APK that runs on the Google Glass device itself. This gives you the most access to the device, its sensors and features. Turns out this is also easy enough to do with Delphi XE5.

The actual GDK builds on top of the Android SDK. You can develop apps to run on Glass with either the Android SDK or GDK, but the GDK is necessary to take advantage of some of the Glass specific features.

If you run SysCheck on Glass (which takes some effort) you discover it has an ARMv7 PRocessor rev 3 (v71) with Android OS Version 4.0.4 and NEON support. Those meet the main requirements for Delphi XE5 development. So I created a simple Hello World app and ran it.

This first screenshot shows Glass appearing in the Project Manager as a valid target (once the required USB drivers were installed, which was tricky for glass).

HelloGlassProjectManager

Here is a screenshot of the app running on Glass

Delphi XE5 App running on Google Glass

I didn’t hide the status bar, which most Glassware does, and it does nothing other than serve the purpose of showing a Delphi XE5 app running on Google Glass. There were no special settings (other than the dark theme, which is a matter of taste) to make the app run on Glass. It just works.

And lastly a quick selfie of me and Glass, taken through glass.

JimWithGlass

I was hoping it would look more red than orange, but should have known Tangerine would be orange.

Rest assured, there will be more coverage of Delphi and Glass. We are just getting warmed up. This app was not using the GDK (which is still in Beta) but it is an actual Delphi app running on Glass. What an exciting day!

Leave a comment ?

17 Comments.

  1. German Pablo Gentile

    Wow! Great stuff. thanks!

  2. Jim! This is trully fantastic!!

  3. so, Like it!!!!

  4. Delphi XE5????? Google Glass?? | Levin's Blog-??? - pingback on 5-Nov-2013 at 9:52 pm
  5. make sure you dont get caught driving with one in use! :)

  6. ¡Super Great! :)

  7. The Delphi never let us down! I love Dephi!

  8. wow , sound like good

  9. Needs an Opti-Grab! :)

    Nice work Jim, thanks.

  10. scott Shekels

    I am curious if the GDK can be imported into Delphi in some manner. It seems that would allow access to some of the specific functions it supports. Is that possible? I have Glass now and am itching to work with it in Delphi!

  11. Scott: You should be able to. Check out Brian Long’s CodeRage 8 session for some tips . . . . http://www.youtube.com/watch?v=GcuYc7F0lIU

  12. scott Shekels

    thanks Jim, I’ll check it out! S.

  13. Liens de l’épisode 1 de la saison 3 | Le Dev du Jeudi - pingback on 14-Mar-2014 at 5:14 am

Leave a Reply

Trackbacks and Pingbacks: