Reputation: 61
The "Add a cat to that" example explains how to share a photo with my service.
But is there a way to share a photo with a text (using voice recorder) in a single item ?
Upvotes: 4
Views: 208
Reputation: 13954
Yup! You can do this using the REPLY built-in menu item.
However, the flow is a bit different than the Add a Cat to That flow. It works like this:
timeline
collection.Insert a timeline item with the REPLY built in action specified as shown here. Optionally, you can rename the menu item and customize the icon.
{
"text": "Hello world",
"menuItems": [
{
"action": "REPLY"
}
]
}
The timeline card will have a reply option in its menu. When the user selects it, they will be prompted to speak.
Your Glassware is then notified about this item insertion. The notification looks something like this:
{
"collection": "timeline",
"itemId": "3hidvm0xez6r8_dacdb3103b8b604_h8rpllg",
"operation": "INSERT",
"userToken": "harold_penguin",
"verifyToken": "random_hash_to_verify_referer",
"userActions": [
{
"type": "REPLY"
}
]
}
text
property) and the attached audio recordingUpvotes: 3