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

后端 未结 4 976
深忆病人
深忆病人 2021-01-03 09:08

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

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

However, the applicat

相关标签:
4条回答
  • 2021-01-03 09:34

    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.

    0 讨论(0)
  • 2021-01-03 09:47

    Please make sure you have XE11 update, otherwise it wont' work.

    0 讨论(0)
  • 2021-01-03 09:53

    In addition to use voice trigger or touch menu to launch, you can also use adb command to launch the service, this will save some time, because it gets kind of old to manually navigate to launch the app.

    adb shell am startservice com.google.android.glass.compass/com.google.android.glass.sample.compass.CompassService 
    adb shell am startservice com.google.android.glass.timer/com.google.android.glass.sample.timer.TimerService
    adb shell am startservice com.google.android.glass.stopwatch/com.google.android.glass.sample.stopwatch.StopwatchService: 
    

    or

    adb shell am startservice <name of service>
    adb shell am start <name of activity>
    
    0 讨论(0)
  • 2021-01-03 09:55

    You can also edit the debug configuration. The second section should have a launch activity option. Since you don't have a default (because it is triggered by the voice intent) you can select one from the project manually. this will then auto launch the main activity when you debug the application.

    0 讨论(0)
提交回复
热议问题