How to send nested cards at the same time?

I created a Java application where I create a package of 4 cards. The problem is that all cards are not included immediately. Only one appears several times, then after a few seconds or a minute other cards appear. How to make them appear simultaneously on the headset?

edit: I tried paging HTML and it didn't work, and now I think I'm more confused. So in my senario here, I want to send a bunch of landmarks to a user that they can go to. I want all the landmarks to be included, I want the package cover, which is not an option in the bundle that says: β€œHere are your landmarks,” and I would like this package to be available to the user at the same time, How can i achieve this?

TimelineItem timelineItemEmpire = new TimelineItem(); timelineItemEmpire.setText("Empire State Building"); // Triggers an audible tone when the timeline item is received timelineItemEmpire.setNotification(new NotificationConfig().setLevel("DEFAULT")); Location empireLoc = new Location(); empireLoc.setLatitude(40.748492); empireLoc.setLongitude(-73.985868); timelineItemEmpire.setLocation(empireLoc); // Attach an image, if we have one URL url = new URL(WebUtil.buildUrl(req, "/static/images/empirestate.jpg")); timelineItemEmpire.setBundleId(bundleId); List<MenuItem> menuItemList = new ArrayList<MenuItem>(); menuItemList.add(new MenuItem().setAction("NAVIGATE")); timelineItemEmpire.setMenuItems(menuItemList); MirrorClient.insertTimelineItem(credential, timelineItemEmpire, contentType, url.openStream()); TimelineItem timelineItemCP = new TimelineItem(); timelineItemCP.setText("Central Park"); // Triggers an audible tone when the timeline item is received timelineItemCP.setNotification(new NotificationConfig().setLevel("DEFAULT")); // Attach an image, if we have one URL url3 = new URL(WebUtil.buildUrl(req, "/static/images/central_park.jpg")); timelineItemCP.setBundleId(bundleId); Location cpLoc = new Location(); cpLoc.setLatitude(40.772263); cpLoc.setLongitude(-73.974488); timelineItemCP.setLocation(cpLoc); timelineItemCP.setMenuItems(menuItemList); MirrorClient.insertTimelineItem(credential, timelineItemCP, contentType, url3.openStream()); TimelineItem timelineCover = new TimelineItem(); timelineCover.setText("Nearby Landmarks"); timelineCover.setBundleId(bundleId); // Triggers an audible tone when the timeline item is received timelineCover.setNotification(new NotificationConfig().setLevel("DEFAULT")); // Attach an image, if we have one URL url4 = new URL(WebUtil.buildUrl(req, "/static/images/bundle_cover.jpg")); MirrorClient.insertTimelineItem(credential, timelineCover, contentType, url4.openStream()); 
+7
source share
1 answer

You need to set the isBundleCover resource to true for your cover; i.e:.

 timelineCover.setIsBundleCover(true); 

This will make it the entry point to the kit and prevent it from being displayed inside the package, as described here .

Alternatively, you can use BatchRequest to make sure they are sent together; For example,

 BatchRequest batch = MirrorClient.getMirror(null).batch(); BatchCallback callback = new BatchCallback(); for (TimelineItem item : items) { MirrorClient.getMirror(userCredential).timeline().insert(item).queue(batch, callback); } batch.execute(); 
+6
source

All Articles