使用Mirror API插入时间线卡,其中的束中有束? [英] Insert Time line card using Mirror API, which has bundle inside bundle?

查看:90
本文介绍了使用Mirror API插入时间线卡,其中的束中有束?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用在C#.Net Mirror API中插入时间轴卡(在束中包含束)?

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

在下面的代码中,我正在做的是创建一个捆绑包. 我想要的是item1和item2是不同的捆绑包.有可能吗? 有解决办法吗?

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

推荐答案

Mirror API当前不支持嵌套捆绑软件,您可以通过星号获取有关此区域进度的更新信息:

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

根据您的用例,您还可以尝试通过对内部捆绑包使用带有分页的HTML卡来解决此问题,但这仅在捆绑包中的卡都具有相同的菜单项时才有效.

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.

因此,与其创建多个卡的捆绑包,不如创建一个卡,将所有卡的所有内容都以HT​​ML格式放置,然后将其设为auto-paginate或明确定义单独卡的内容.有关详细信息和信息,请参见 https://developers.google.com/glass/timeline#paginating .例子.

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.

然后您可以将每个这些分页的HTML卡添加到您的捆绑包中.

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

这篇关于使用Mirror API插入时间线卡,其中的束中有束?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆