Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
262 views
in Technique[技术] by (71.8m points)

c# - Insert Time line card using Mirror API, which has bundle inside bundle?

How to Insert Time line card using In C#.Net Mirror API, which has bundle inside bundle?

In below code what I am doing is create a single bundle. What I want is item1 and item2 to be different bundles. Is is possible? Is there a solution?

           TimelineItem item = new TimelineItem()
            {
                Text = controller.Request.Form.Get("message"),
                BundleId = "112",
                IsBundleCover=true,
                Notification = new NotificationConfig() { Level = "DEFAULT" }
            };

            TimelineItem item1 = new TimelineItem()
            {
                Text = "Amalan",
                BundleId = "112",
                Notification = new NotificationConfig() { Level = "DEFAULT" }
            };

            TimelineItem item2 = new TimelineItem()
            {
                Text = "Sanath",
                BundleId = "112",
                Notification = new NotificationConfig() { Level = "DEFAULT" }
            };
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Nested bundles aren't currently supported in the Mirror API, there's an issue you can star to get updates on the progress in this area: https://code.google.com/p/google-glass-api/issues/detail?id=167

Depending on your use case, you can also try to work around this by using HTML cards with paging for the inside bundles, but this will only work if the cards in the bundle all have the same Menu Items.

So instead of creating a bundle of several cards you would create one card where you put all the contents of all cards as HTML, and then either let it auto-paginate or explicitely define the content of the separate cards. See https://developers.google.com/glass/timeline#paginating for details and examples.

You can then add each of these paginated HTML cards to your bundle.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...