What gets shared?

Something is not clear to me regarding the action of the action.

Does the endpoint share (google + contacts or other signed glassware) get a timeline element with what it contains (html, attachment ...)?

Example:

If I have this item on my timeline ...

{ "menuItems": [{"action": "SHARE"}], "html": "<div>a beautiful HTML card</div>", "location": { "latitude": 40.702587, "timestamp": "2013-05-20T19:22:56.164600", "displayName": "KLOMPCHING GALLERY", "longitude": -73.98926, "address": "111 Front Street" }, "id": 42004, "isDeleted": false, "kind": "mirror#timelineItem" } 

... and I click on share: will the sharing endpoint get the same JSON object?

+4
source share
1 answer

By inserting a time map using the SHARE menuItem, you allow the user to share this map with another glass that supports this type of map (for example, image, video, link, etc.).

When a user decides to share this card with other utensils, this happens:

  • Glass creates a copy of the timeline map (including attachments, html, text, recipients, etc.).
  • Glass establishes the ownership of the copy on Glassware to which it belongs.
  • If Glassware signs up for notifications, the Mirror API sends a notification to Glassware: the SHARE action is now processed before Glassware.

You can check out this Google I / O session on Building Glass Services with the Mirror API we did last week to learn more about sharing the model.

+2
source

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


All Articles