2

I'm using GDK TimelineManager to insert a static card to the timeline, and I noticed that there's no just now or something like that displayed on the right footer.

What am I doing wrong? Is the time just for the Mirror API or am I missing something here?

albusshin
  • 3,930
  • 3
  • 29
  • 57

3 Answers3

1

This isn't possible as of XE12. The APIs you would need are not provided by GDK's static card API.

If this is something you'd like to see in a future release, request it in the Glass platform issue tracker

mimming
  • 13,974
  • 3
  • 45
  • 74
-1

if you already have a card setup and are looking for static time use java standard libraries to produce a time.

More on this here

Java code for getting current time

//card 
String time = new java.util.Date();
card1.setText("This card has a footer.");
card1.setFootnote(time);
Community
  • 1
  • 1
StanleyZheng
  • 4,008
  • 3
  • 21
  • 24
  • No I do not want the Footnote to display a static time there, I want the card to display something like "just now" or "2 hours ago" or "yesterday", just as after you take a picture the card displayed on the timeline. – albusshin Mar 04 '14 at 16:38
  • My mistake I see what you mean, case examples would be a tweet in the mirror api where it shows relative time. My guess would be it uses timeline manager to run a background service to get the cards existing with that glassware and using the timeline manager to update it. Theres a stored reference to the time. https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/timeline/TimelineManager – StanleyZheng Mar 05 '14 at 00:07
-1

With GDK API it is not possible.

However assuming that this is a view, not the card and if purpose pays the price the classic Android approach can be used. You can create a regular android view and put time wherever you like, just make sure it's right size, the size of the card. There is a way to have overlay view and put time on it in desired coords.

If the point is to have this as a card - then I am out of ideas.

Pavlonator
  • 879
  • 1
  • 9
  • 21