Colin747
Colin747

Reputation: 5013

GDK LiveCard issues - XE19.1

I'm having trouble trying to get LiveCards to work on Google Glass XE19.1. The error I am getting is Cannot resolve symbol LiveCard.

From what I understand this was removed in a previous update but the Google GDK docs still show this as the way to develop on glass. Any code examples I can find all use com.google.android.glass.timeline.LiveCard; or com.google.android.glass.timeline.TimelineManager;

What is the current method of displaying live cards using the GDK and is there any up to date examples/documentation?

Upvotes: 1

Views: 188

Answers (1)

Brandon Wuest
Brandon Wuest

Reputation: 206

As of XE16, TimelineManager was removed from the GDK so I suspect you are working with an out of date version of the library (see https://developers.google.com/glass/release-notes).

Once you update your version of the GDK, creating a live card and publishing it should require:

import com.google.android.glass.timeline.LiveCard;
import com.google.android.glass.timeline.LiveCard.PublishMode;
...
LiveCard liveCard = new LiveCard(context, "MyLiveCardTag");
liveCard.publish(PublishMode.REVEAL);

For a more in-depth guide on how to create live cards, see https://developers.google.com/glass/develop/gdk/live-cards.

Upvotes: 2

Related Questions