3

The voice trigger for the Compass Sample app is "show a compass": Compass voice trigger But when navigating to the card via the touch pad, it reads "Show compass": Compass card

I've looked in the source code for the app and couldn't find anything.

How can I do the same in my own app?

Paul Young
  • 1,489
  • 1
  • 15
  • 34

2 Answers2

1

It seems that this is something which is set outside of individual Glassware and rather at the GDK level when a voice command gets approved.

This makes sense since voice commands should be somewhat generic as they'll potentially be used by multiple apps.

I imagine that the icon used on the card is also set in a similar way.

It would be great if someone associated with Glass could confirm all of this.

Paul Young
  • 1,489
  • 1
  • 15
  • 34
  • Yes, this is correct. The voice trigger, touch menu text, and icon for an approved voice command are all built-in to Glass, and this set will grow as more commands are requested and approved. – Tony Allevato Dec 12 '13 at 14:46
1

I just changed the show_compass_voice_trigger value in the strings xml file, ran it and it did in fact display the new value in both the voice commands menu and timeline menu. Seems to me there's some semantics logic involved in the timeline menu stripping the "a" from "show a compass" (as well as capitalizing the first letter).

As for the icon, it is set in the manifest application android:icon node.