0

I'm adding a static card to my google glass timeline.

How can I dismiss this card after 2 seconds?

Is it possible to delay-dismiss even if the activity which created this card has finished already?

Elad Benda
  • 35,076
  • 87
  • 265
  • 471

1 Answers1

2

You should be able to use a combination of Handler.postDelayed(Runnable, long) and TimelineManager.delete(long)

Example:

mHandler.postDelayed(new Runnable() {
    public void run () {
        mTimelineManager.delete(cardId);
    }
}, 5000);

If you are using a Service then you can do this even after the Activity has finished.

swooby
  • 3,005
  • 2
  • 36
  • 43