As of firmware update XE7, Glass adds a "View Website" action to search results. How do I add this action to my own timeline cards, such that it will open the Glass Browser with an arbitrary URL?
How do I add the "View Website" action to a timeline card?
Asked Answered
Add the OPEN_URI
built-in menu item to your timeline item and the URL to menuItem.payload
. The JSON for a timeline item might look like this:
{
"text" : "Hello World!",
"menuItems" : [{
"action" : "OPEN_URI",
"payload" : "http://example.com"
}]
}
You can read more about built-in menu items on the official documentation for this feature.
Thanks, Jenny. Issue 137: Make "View Website" a built-in menu action –
Insalivate
Well, it's documented as part of developers.google.com/glass/v1/reference/timeline/insert under menuItems[].action = VIEW_WEBSITE so does XE7 not support handling those? –
Dispersion
© 2022 - 2024 — McMap. All rights reserved.