Is there a way to create a Timeline Bundle card using the GDK?
I'm currently creating a Timeline card this way:
mLiveCard = mTimelineManager.createLiveCard(LIVE_CARD_ID);
mLiveCard.setViews(views);
mLiveCard.publish(LiveCard.PublishMode.REVEAL);
This creates a single Live card in the Timeline. I tried adding another with the same TAG, thinking it would bundle them together and the most recent will be the Bundle Cover card, but it didn't do the trick.
I looked at the docs, and all I could find is how to do it using the Mirror API. So is there a way to create a Bundle card using the GDK? Or is this only available through the Mirror API? Thanks.
You do not need to use Mirror API for this.
You can mimic a bundle using a live card by publishing a LiveCard
whose action is a pending intent to start an activity containing a CardScrollView
, which then would contain the cards that you want in the bundle. Tapping the LiveCard
would then launch that activity and let the user scroll through those cards. You can also go further and attach a menu to the activity so that you can configure menu items for each of the cards, since at that point it's just a regular Android activity and layout.
The tag passed into createLiveCard
is purely for debugging purposes – it is not used for any other kind of identification or grouping.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With