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

[亡魂溺海] 提交于 2019-12-13 23:51:31

问题


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" }
            };

回答1:


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.



来源:https://stackoverflow.com/questions/19044167/insert-time-line-card-using-mirror-api-which-has-bundle-inside-bundle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!