<tfoot id='6TZ1W'></tfoot>

    1. <i id='6TZ1W'><tr id='6TZ1W'><dt id='6TZ1W'><q id='6TZ1W'><span id='6TZ1W'><b id='6TZ1W'><form id='6TZ1W'><ins id='6TZ1W'></ins><ul id='6TZ1W'></ul><sub id='6TZ1W'></sub></form><legend id='6TZ1W'></legend><bdo id='6TZ1W'><pre id='6TZ1W'><center id='6TZ1W'></center></pre></bdo></b><th id='6TZ1W'></th></span></q></dt></tr></i><div id='6TZ1W'><tfoot id='6TZ1W'></tfoot><dl id='6TZ1W'><fieldset id='6TZ1W'></fieldset></dl></div>

      <small id='6TZ1W'></small><noframes id='6TZ1W'>

      1. <legend id='6TZ1W'><style id='6TZ1W'><dir id='6TZ1W'><q id='6TZ1W'></q></dir></style></legend>
          <bdo id='6TZ1W'></bdo><ul id='6TZ1W'></ul>

        从 PC 向 Android 手机发送命令 - 通过物理连接(USB、串行等)

        时间:2023-09-12
        <tfoot id='16tch'></tfoot>

            <bdo id='16tch'></bdo><ul id='16tch'></ul>

            1. <small id='16tch'></small><noframes id='16tch'>

                  <tbody id='16tch'></tbody>

                <legend id='16tch'><style id='16tch'><dir id='16tch'><q id='16tch'></q></dir></style></legend>

                • <i id='16tch'><tr id='16tch'><dt id='16tch'><q id='16tch'><span id='16tch'><b id='16tch'><form id='16tch'><ins id='16tch'></ins><ul id='16tch'></ul><sub id='16tch'></sub></form><legend id='16tch'></legend><bdo id='16tch'><pre id='16tch'><center id='16tch'></center></pre></bdo></b><th id='16tch'></th></span></q></dt></tr></i><div id='16tch'><tfoot id='16tch'></tfoot><dl id='16tch'><fieldset id='16tch'></fieldset></dl></div>
                  本文介绍了从 PC 向 Android 手机发送命令 - 通过物理连接(USB、串行等)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在开展一个项目,以在 Android 手机上从 PC 上自动执行一些任务(例如播放歌曲、播放视频、接收蓝牙数据等).

                  I'm working on a project to automate some tasks (such as play a song, play a video, receive bluetooth data, etc) on an Android phone from a PC.

                  基本上,PC 会向手机发送通知程序,然后手机上的应用程序或其他东西会处理通知程序并执行某些操作".与此相反:http://code.google.com/p/android-notifier/

                  Basically the PC will send a notifier to the phone and an app or something on the phone would then process the notifier and do 'something'. The opposite of this really: http://code.google.com/p/android-notifier/

                  我看到了一些示例,展示了如何通过网络连接向 Android 侦听器应用或服务发送命令,但在这种情况下,我更希望通过物理连接进行传输.

                  I've seen some examples showing how to send commands to an Android listener app or service via a network connection, but in this case, I would much rather the transmission be over a physical connection.

                  USB理想情况下,我希望通过 USB 端口进行连接.但我在网上看到一些帖子表明 SDK 本身并不支持这一点.(Android 应用程序,与插入的设备通信USB 端口).

                  USB Ideally, I'd like the connection to be via the USB port. But I've seen some posts online that suggest that the SDK does not natively support this. (Android apps, communicating with a device plugged in the USB port).

                  • 是否有其他一些 SDK/API 可以让这更容易?
                  • 我在 ADB 上看到过一些帖子,但不是很明白……这行得通吗?(http://developer.android.com/guide/developing/tools/adb.html)

                  通过 USB 串行传输我还看到一些网站展示了如何使用分线盒执行双向串行通信,但仅限于 G1.新手机可以做到这一点吗?

                  Serial over USB I've also seen some sites that show how to use a breakoutbox to perform bi-directional serial communication, but only with the G1. Is this possible with newer phones?

                  电话我对任何新手机都持开放态度.我目前正在看 Galaxy S,因为它通过耳机插孔输出视频.如果需要,我愿意生根.

                  The Phone I'm open to really any newish phone. I'm currently looking at the Galaxy S, because it has the video out through the headphone jack. I'm open to rooting if need be.

                  推荐答案

                  在您的应用中实现 HTTP 服务器,然后将手机置于 USB Tether 模式.这将在您的手机和 PC 之间创建一个本地网络.然后,您应该能够使用手机的 ip 发送 HTTP 请求或创建 websocket.

                  Implement a HTTP server in your app, then put your phone in USB Tether mode. This will create a local network between your phone and your PC. You should then be able to send HTTP request or create websockets using the phone's ip.

                  我对其进行了测试,它可以工作,请参阅 这里

                  EDIT : I tested it, and it works, see here

                  这篇关于从 PC 向 Android 手机发送命令 - 通过物理连接(USB、串行等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Android:与安卓设备的RS232串行通信 下一篇:Android:USB通信Android&lt;-&gt;外接设备

                  相关文章

                  <legend id='DM5jr'><style id='DM5jr'><dir id='DM5jr'><q id='DM5jr'></q></dir></style></legend>

                  <i id='DM5jr'><tr id='DM5jr'><dt id='DM5jr'><q id='DM5jr'><span id='DM5jr'><b id='DM5jr'><form id='DM5jr'><ins id='DM5jr'></ins><ul id='DM5jr'></ul><sub id='DM5jr'></sub></form><legend id='DM5jr'></legend><bdo id='DM5jr'><pre id='DM5jr'><center id='DM5jr'></center></pre></bdo></b><th id='DM5jr'></th></span></q></dt></tr></i><div id='DM5jr'><tfoot id='DM5jr'></tfoot><dl id='DM5jr'><fieldset id='DM5jr'></fieldset></dl></div>
                    <bdo id='DM5jr'></bdo><ul id='DM5jr'></ul>

                    1. <tfoot id='DM5jr'></tfoot>

                      <small id='DM5jr'></small><noframes id='DM5jr'>