Question

I am testing out the mirror api and so far I have a sample app running nicely.

The issue I am having is that I added a menu item for the action 'SHARE' but when I try to share the timeline card created by my app to Google+ it posts an empty Google+ post. The only text in the Google+ post is #throughglass. The contents of the timeline card is some simple html (see below) which renders find on glass. I also set the speakable text which works great with the 'READ_ALOUD' menu action. What gives on the 'SHARE' action, am I missing something?

Link to Google+ post

Timeline Item html:

<article class="auto-paginate">
<section>
  <p class="text-auto-size">
    Hello Word.
  </p>
</section>
</article>
Was it helpful?

Solution

Each application is free to choose what, from the shared timeline item, it will use as part of the share command. The Google+ Glassware appears to use the text field only when sharing a textual item and ignores the html field.

(This makes some sense. Google+ can't display the HTML formatting, so it chooses to go with the text that it knows should be good.)

When you're writing Glassware, you should make sure both the text and html (and speakableText, for that matter) fields contain the correct representation of your item.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top