Android Anymote协议数据消息使用
Google TV Anymote协议定义了几个可以发送到GTV设备的请求 我使用了这个事件,它基本上被转换为GTV上的一个意图,请求消息中指定的URI就是意图中的URI 我不确定在哪里使用事件,或者在发送到GTV设备时如何解释事件 是否可以向特定应用程序发送一些任意数据(设置过滤器)?如果没有,它的用途是什么?它是否也转化为一种意图 以下是消息定义:Android Anymote协议数据消息使用,android,google-tv,Android,Google Tv,Google TV Anymote协议定义了几个可以发送到GTV设备的请求 我使用了这个事件,它基本上被转换为GTV上的一个意图,请求消息中指定的URI就是意图中的URI 我不确定在哪里使用事件,或者在发送到GTV设备时如何解释事件 是否可以向特定应用程序发送一些任意数据(设置过滤器)?如果没有,它的用途是什么?它是否也转化为一种意图 以下是消息定义: // Sends a string and a type to interpret this string message Data {
// Sends a string and a type to interpret this string
message Data {
// The type of data sent to the box
required string type = 1;
// The data sent to the box
required string data = 2;
}
数据协议的基本用例是将文本发送到TextView。在Google TV远程代码中,键盘活动捕获文本输入: Anymote发送方通过Anymote协议设置传输: 在Anymote代码中,DeviceMessageAdapter将数据绑定到数据协议: 服务器(Google TV)将这些事件转换为KeyEvents,并将其传递给前台活动