Android:在 Ubuntu 上阅读/发送短信?
作为一名 Android 程序员,我花费了大量时间将测试设备(手机)插入计算机。由于我很懒,我希望能够通过手机通过计算机发送短信。
例如: 我收到一条文本,该文本被推送到活动的 ADB 连接,我可以将其发送到正在运行的脚本,该脚本将允许我在计算机上查看该文本。然后我可以输入响应,按 Enter 键,这将通过活动的 ADB 连接将文本推送到手机并发送到目标。
我有办法做到这一点吗?也许有一个我可以通过 python 脚本或其他东西路由的 ADB 命令?
As an android programmer I spend an awful lot of time with my test device (phone) plugged into my computer. And being as lazy as I am, I would like to be able to send texts via my computer through my phone.
For example:
I get a text, The text is pushed to the active ADB connection from which I can send it to a running script that will allow me to see the text on my computer. I can then type the response, hit enter, which will push the text through the active ADB connection, to the phone and be sent to the target.
Is there any way I do this? Maybe there is an ADB command that I can route through a python script or something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我推荐 SL4A 脚本层。您可以通过 adb 或 tcp/ip 连接到 SL4A 托管服务器,然后执行脚本发送短信。在SL4A支持的几种脚本语言中,我认为python API是最成熟和有用的。
SL4A 远程控制:
http://code.google.com/p/android-scripting /wiki/RemoteControl
SL4A 短信 API:
http://code.google.com/p/android-scripting/wiki/ApiReference#smsSend
I recommend SL4A scripting layer. You can connect to SL4A hosted server via adb or tcp/ip, and then execute script to send SMS. Among several script language supported by SL4A, I think python API is most mature and useful.
SL4A Remote Control:
http://code.google.com/p/android-scripting/wiki/RemoteControl
SL4A SMS API:
http://code.google.com/p/android-scripting/wiki/ApiReference#smsSend
试试这个:
Try this one:
为此,您可以使用 Gmail,在 Gmail 页面的聊天小部件上,将鼠标悬停在您想要向其发送短信的联系人上。单击“更多”按钮,您将看到一个发送短信选项。如果您还没有该联系人的电话号码,系统会提示您输入电话号码。我刚刚将自己添加到 Gmail 的联系人中,以便给自己发送短信。
You can use gmail for this, on the chat widget in your gmail page, mouse over the contact you want to sms. Click the more button and you will see a send sms option. If you don't already have a phone number for that contact it will prompt you to enter a phone number. I just added myself to my contacts in gmail to send myself texts.