Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you allow a user to REPLY to a card and not have a card appear with their response text in the timeline?

When I have a bundle (perhaps this also occurs with a single timeline card) with a REPLY action and the user executes that action, with lets say "peanut butter and jelly sandwich", a new timeline card appears with white text on a black background on Glass with the text "peanut butter and jelly sandwich". When looking at the playground that same card appears with the user's avatar on the left (like the Abe Lincoln template example), and the text on the right.

Lets call this new card the reminder card, as it reminds the user what text they spoke and allowed to be sent.

I did not insert that reminder card into the timeline.

Is this default Glass behavior for the REPLY action to insert a reminder to the user that they spoke some text? Does this count against our API tally, or is it a freebie and charged against some Google account?

Is there a way to use the REPLY action and apply some kind of undocumented attribute to prevent the display of this reminder card?

There is this documentation here which seems to encourage non-repeated REPLY actions, which could be motivated by this reminder card behavior.

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

Source

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

menuItemList.add(new MenuItem().setAction("REPLY"));
like image 632
Mark Scheel Avatar asked Jun 20 '13 15:06

Mark Scheel


2 Answers

The "REPLY" timeline item is automatically inserted by the Glass client and its ownership is set to your Glassware: this means that you have full read/write access to this timeline item.

It is up to your Glassware to process the timeline item and apply some styling. The timeline item is also useful for the user as it lets the user "DELETE" the reply if necessary. If deleting the reply does not make sense in your Glassware, feel free to delete the timeline item when processed to remove it from the user's timeline.

Regarding API quota, this is only counted when you send an actual request to the API like retrieving the timeline item. Glass creating the "REPLY" does not consume your quota.

like image 96
Alain Avatar answered Sep 28 '22 04:09

Alain


Standard practice is for your Glassware to either UPDATE the reply after you process it, or to DELETE the reply if it is no longer required. Either may make sense depending on the exact context of how the reply is handled. It may even make sense to add this existing reply to another bundle that you control.

As Alain noted, there is no quota on the number of cards that exist - just on the number of operations that you do. This isn't an operation that you take, so it doesn't count against the quota.

Finally, although not completely related, it is worth noting that this also happens when you SHARE a card - a copy of the card is made and you're permitted to that new card. Your application may take any actions on this new card that you wish.

like image 24
Prisoner Avatar answered Sep 28 '22 05:09

Prisoner