Loading Google Glass GDK sample

两盒软妹~` 提交于 2019-12-11 05:16:48

问题


I have a problem to load Google Glass GDK sample (Compass, Stopwatch, or Timer) to my google-glass. I use Eclipse for this. In the console, it shows me successful message

[2014-04-20 19:42:56 - Compass] Installing Compass.apk... [2014-04-20 19:42:58 - Compass] Success! [2014-04-20 19:42:58 - Compass] /Compass/bin/Compass.apk installed on device [2014-04-20 19:42:58 - Compass] Done!

This post suggests I use a voice trigger to activate the service (e.g.: "ok glass, show a compass"). But it doesn't work for me. I also tried another suggestion from different post to go to Run/ Debug configuration to specify exactly which activity to run. But in my case, the "Launch" option under "Android" Tab doesn't give me any selection.

My google glass version is currently XE12.1

Thank you in advance for the help!


回答1:


If the sample projects you are using are from the Android SDK API Level 19 samples folder, or Github, then these projects have been updated to work with XE16 and won't work on XE12.X.

You'll need to use the samples under the API Level 15 folder on XE12.X.

Or, update your Glass to XE16, and then the most recent version of the samples should work for you.

All versions of sample projects are activated by voice command (e.g., "ok glass, show a compass").




回答2:


Use this adb command from the command line on a PC or Terminal on a mac:

adb shell am start -n com.google.android.glass.sample.compass/com.google.android.glass.sample.compass.CompassMenuActivity

While Glass is ADB connected and is the only ADB device connected.

This should launch the Compass activity for you on XE12.

I got the package name and activity name from here:

https://github.com/googleglass/gdk-compass-sample/blob/master/AndroidManifest.xml

Perhaps if you are using different code, you'll need to tweak the adb shell command.



来源:https://stackoverflow.com/questions/23190034/loading-google-glass-gdk-sample

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!