Search code examples
google-glassgoogle-gdk

Running Timer, Stopwatch, and Compass example on Glass doesn't seem to work


I ran the timer, stopwatch, and compass example here:

https://developers.google.com/glass/develop/gdk/quick-start#for_android_beginners

However, the application builds but doesn't run. This is all I can get in logcat:

[2013-11-19 15:58:21 - CompassMenuActivity] ------------------------------
[2013-11-19 15:58:21 - CompassMenuActivity] Android Launch!
[2013-11-19 15:58:21 - CompassMenuActivity] adb is running normally.
[2013-11-19 15:58:21 - CompassMenuActivity] No Launcher activity found!
[2013-11-19 15:58:21 - CompassMenuActivity] The launch will only sync the application package on the device!
[2013-11-19 15:58:21 - CompassMenuActivity] Performing sync
[2013-11-19 15:58:21 - CompassMenuActivity] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2013-11-19 15:58:23 - CompassMenuActivity] Uploading CompassMenuActivity.apk onto device '0***************0C'
[2013-11-19 15:58:23 - CompassMenuActivity] Installing CompassMenuActivity.apk...
[2013-11-19 15:58:24 - CompassMenuActivity] Success!
[2013-11-19 15:58:24 - CompassMenuActivity] /CompassMenuActivity/bin/CompassMenuActivity.apk installed on device
[2013-11-19 15:58:24 - CompassMenuActivity] Done!

I'm using

Eclipse Standard/SDK

Version: Kepler Release Build id: 20130614-0229


Solution

  • Using the "Run as" menu in Eclipse will only install the APK on the device but won't run it, because none of the application components in the manifest have android.intent.category.LAUNCHER.

    Instead, after the APK is installed, you can use the voice trigger on Glass to start it. For example, say "ok glass, show a compass" for the Compass sample. This will start the CompassService service that publishes the live card to the timeline.