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!

This entry was posted in Android, Delphi Projects, Mobile, News, REST. Bookmark the permalink.

17 Responses to Hello Google Glass from Delphi XE5

  1. German Pablo Gentile says:

    Wow! Great stuff. thanks!

  2. Jim! This is trully fantastic!!

  3. Al Mannarino says:

    Most Excellent!

  4. LeeJekwan says:

    so, Like it!!!!

  5. Pingback: Developing for Google Glass with Delphi XE5 | The Daily Developer

  6. Pingback: Delphi XE5????? Google Glass?? | Levin's Blog-???

  7. make sure you dont get caught driving with one in use! :)

  8. Yonny says:

    ¡Super Great! :)

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

  10. wow , sound like good

  11. fraz says:

    Needs an Opti-Grab! :)

    Nice work Jim, thanks.

  12. scott Shekels says:

    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!

  13. Jim McKeeth says:

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

  14. scott Shekels says:

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

  15. Pingback: Liens de l’épisode 1 de la saison 3 | Le Dev du Jeudi

Leave a Reply