Question

I wish to add a custom footer with time stamp and a logo. Time stamp is there by default, but logo is now.

I am able to add this separately in Google Glass playground:

https://developers.google.com/glass/tools-downloads/playground

I know we can add a tag in card html like:

<footer><img src='data:image/png;base64,iVBORw0KGgoAA...'/></footer>

But it is not formatted correctly. Playground gives a css file as well, but how to insert this in actual cards using PHP Client library for Google Glass

Also, if there is any available documentation for the same library, please let me know. I was unable to find any.

Thanks.

Was it helpful?

Solution

The timestamp and logo are added on the right side of the footer by Glass automatically - you don't control it. The time stamp is always there and the logo will be added when your Glassware has been reviewed by Google and is publicly available on the MyGlass page.

You can emulate this on the Playground by including the URL in the box labeled "Footer brand icon" under the preview screen.

On real pages, the tag can still be used to add text on the left side of the footer

<article>
  <section>
    Footer example
  </section>
  <footer>
   <img class="left" src="data:image/png;base64,iVBORw0KGgoAA..."/>
  </footer>
</article>

The CSS file linked to from the Playground page is already made available on Glass - you don't need to include it, all of the styles defined in it are already available to you.

Instead of calling timelineItem.setText() as is illustrated at the PHP example at https://developers.google.com/glass/v1/reference/timeline/insert you can create the card in HTML and call it with timelineItem.setHtml(). You can read the documentation/source for this PHP library at https://code.google.com/p/google-api-php-client/source/browse/trunk/src/contrib/Google_MirrorService.php. Note that there are some slight differences between this version (version 0.6.x which is what comes with the QuickStart and which the examples currently use) and the 1.0.x versions at https://github.com/google/google-api-php-client

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