Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A few things.</p> <p>First, the answer you referenced doesn't say that there can be only one menuItem per card. What it says is there can only be one <strong>menu</strong> per set of htmlPages, meaning that each card had to have the same menu. HtmlPages are now deprecated in favor of HTML that is split, partly because of the confusion of that question.</p> <p>Second, you can absolutely have more than one item in the menuItems setting. Hence the plural and use of the array. :)</p> <p>Third, it looks like you are trying to set "values" for card actions that do not take values (TOGGLE_PINNED and REPLY). Values are only needed for CUSTOM actions.</p> <p>Fourth, make sure that you have a "creator" set for the REPLY type.</p> <p>See <a href="https://developers.google.com/glass/v1/reference/timeline/insert" rel="nofollow">https://developers.google.com/glass/v1/reference/timeline/insert</a> for details, but in general, what you will need to do is to set the menuItems field to an array, with each element in the array having a different action. You will also need a creator field set to reply to. So something like this should work (although I haven't tested this specific one):</p> <pre> { "text": "Test pinnable card", "creator": { "id": "harold" "displayName": "Harold Penguin", "imageUrls": ["https://developers.google.com/glass/images/harold.jpg"] }, "menuItems": [ { "action": "TOGGLE_PINNED" },{ "action": "REPLY" },{ "action": "CUSTOM", "values": [ { "displayName": "Search", "iconUrl": "https:" } ] } ] } </pre> <p>Finally, you may wish to reconsider using a pinned card to do this. This method harkens back to a very app-centric way of doing things, which is somewhat counter to how Glass tends to work. If you would like to add voice commands, consider registering contacts that can accept commands. See <a href="https://developers.google.com/glass/v1/reference/contacts" rel="nofollow">https://developers.google.com/glass/v1/reference/contacts</a> for more details.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload