Question

I'm trying to target Google Glass 4.0.4 (API 15), as that is the version that runs on my hardware. Unfortunately it seems that Glass Development Kit Sneak Peek (API 15) is no longer available. I have Glass Development Kit Preview (API 19) in ADT. While I can target that instead with minSdkVersion=15 there are some problems as classes and interfaces have changed. If I compile with API 19 there is a clear risk that the code will blow up when deployed to the real Google Glass 4.0.4.

Many existing glassware applications, for instance BarcodeEye, have the same issue. BarcodeEye has upgraded to API 19, but will it still run on glasses stuck with 4.0.4?

Obviously the long-term approach is to target the latest release, but for now I need to support the real hardware that is out there. So, how can I do this? Is it possible to get Glass Development Kit Sneak Peek:15 somewhere in order to compile for the right release? If not, can I upgrade my glasses to API 19 (ideally without voiding the warranty)? Or is there a compatibility layer somewhere that can help isolate the application code from the changes?

Was it helpful?

Solution

You should be targeting the latest release (for now XE16.11, API level 19, KitKat). Each Google Glass device will update automatically to the latest release (other than for situations where the user has taken extraordinary measures to delay an upgrade).

During this "Explorer" period, you should always update your Glassware (or pre-candidate Glassware) to use the latest release as soon as you can.

OTHER TIPS

Unless you have rooted your hardware, your Glass should have upgraded to XE16. If it has not, contact the Glass Guides to help determine why not. XE16 is supported for all hardware platforms that are currently in the field, and most users are on XE16.

To deal with changed Glass APIs that have changed and preserve cross-version compatibility, you'll have to use reflection. Java has APIs for retrieving classes and methods by (string) name, which you can use to invoke methods that your selected API version thinks shouldn't be there; and you can use this to check which methods are present, to make your app compatible with both.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top