Can you allow the user to REFUSE to the card, rather than displaying the card with your response text in the timeline?

When I have a package (perhaps this also happens with one time card) with the REPLY action, and the user performs this action, and say, “peanut butter and jelly sandwich”, a new timeline map appears with white text on a black background on glass with the text "peanut butter and jelly sandwich." When viewing the playground, the same map appears with the user avatar on the left (for example, an example of the Abe Lincoln template) and the text on the right.

Allows this new card to resemble a card, as it reminds the user what text they spoke and are allowed to send.

I did not insert this reminder card in the timeline.

Is this the default Glass behavior for the REPLY action to insert a reminder to the user that they have spoken some text? Is this taken into account with our API, or is it freebie and charged to any Google account?

Is there a way to use the REPLY action and apply some kind of undocumented attribute to prevent this reminder map from being displayed?

There is this documentation here that seems to encourage non-repetitive REPLY actions that may be motivated by this reminder behavior.

REPLY, REPLY_ALL - Voice replies are designed to capture free-form input by voice. Do not use voice responses to capture a limited set of parameters, such as possible moves in the game.

A source

Here is the code to reproduce the problem in Java, nothing complicated:

menuItemList.add(new MenuItem().setAction("REPLY")); 
+6
source share
3 answers

The “REPLY” timeline element is automatically set by the Glass client, and its ownership is set on your Glassware: this means that you have full read / write access to this timeline element.

It is up to your glass to process the timeline element and apply some style. The timeline element is also useful for the user, as it allows the user to “DELETE” the response, if necessary. If deleting the answer does not make sense in your utensil, feel free to remove the timeline element during processing to remove it from the user's timeline.

As for the API quota, this is taken into account only when sending the actual request to the API, for example, when searching for a timeline element. The stack that creates "REPLY" does not consume your quota.

+5
source

The standard practice is that your Glassware should either UPDATE the response after processing it, or DELETE the response if it is no longer needed. Anyone can make sense depending on the exact context of the response processing. It may even make sense to add this existing answer to another package that you control.

As Allen noted, there is no quota for the number of cards available - simply by the number of operations you do. This is not an operation that you accept, so it does not take into account the quota.

Finally, although this is not completely related, it is worth noting that this also happens when you ADD a card - a copy of the card is made and you are allowed this new card. Your application can take any action on this new card that you wish.

+3
source

Actually (at least in my opinion) the main reason for the appearance of the map is that your application can access the text somewhere. The response will not add additional information to the original map, but will create a new map with the response text, and the itemId this map will be sent in the notification of your subscription.

What you can do is remove the card after receiving the notification and process the response. The card is completely under your control, so you can manipulate as you like.

+1
source

Source: https://habr.com/ru/post/947754/


All Articles