简体   繁体   English

谷歌眼镜和Android设备之间的数据交换

[英]Exchange data between google-glass and a android device

The scenario: 场景:

I have a android app running my in cellphone. 我有一个运行我的手机的Android应用程序。 I´m the owner of this app. 我是这个应用程序的所有者。 I have a google-glass synced with this cellphone. 我有一个与这款手机同步的谷歌眼镜。 I´m developing a my app for google-glass using the new GDK launch a few weeks ago. 几个星期前我正在使用新的GDK发布开发我的谷歌玻璃应用程序。

I want to send a data from glass to cellphone and then receive a answer. 我想将数据从玻璃发送到手机,然后收到答案。 No internet connection is necessary, so i´m planning to use Bluetooth to this data communication. 不需要互联网连接,所以我打算使用蓝牙进行数据通信。

I can create a Bluetooth socket connection, however this will obligate me to manage it. 我可以创建蓝牙套接字连接,但这将使我无法管理它。 There is no android high level abstraction that permit me to call a service or a activity directly on the cellphone? 没有Android高级抽象允许我直接在手机上调用服务或活动?

AFAIK, there's no direct pipe between them, the glass is basically a phone with a different set of inputs and outputs. AFAIK,它们之间没有直接的管道,玻璃基本上是一个具有不同输入和输出的手机。 You can create and manage the connection, and it's yours. 您可以创建和管理连接,它是您的。

AFAIK, there is no other way to do this, as Travis said there's no direct pipeline between them, seems to be true. AFAIK,没有其他办法可以做到这一点,因为特拉维斯说他们之间没有直接的管道,似乎是真的。 You can use use BLUETOOTH Chat Application included in the Android SDK. 您可以使用Android SDK中包含的BLUETOOTH Chat Application。

  1. Just change the input method to voice input in the application 只需将输入法更改为应用程序中的语音输入

  2. Install that Application in both the devices 在两个设备中安装该应用程序

  3. Try It 试试吧

change the code accordingly to send files too. 相应地更改代码以发送文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM