是否可以从Android模拟器接收短信? [英] Is it possible to receive an SMS from Android emulator?

查看:690
本文介绍了是否可以从Android模拟器接收短信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有一种方法可以从Android仿真器(可能在TCP端口上)接收SMS. 我知道可以通过在仿真器端口上打开TCP套接字并使用"send sms"命令将SMS发送到仿真器,但是也可以通过这种方式接收SMS吗?

I was wondering if there is a way to receive an SMS from Android emulator, perhaps on a TCP port. I know it's possible to send SMS to emulator by opening a TCP socket on the emulator port and using "send sms" command, but is it also possible to receive an SMS this way?

我将详细说明-我有一个在Tomcat服务器上运行的Java应用程序.我也有在同一台机器上运行的Android模拟器.我可以使用"sms send"命令将SMS消息从应用程序发送到仿真器.我还可以通过某种方式接收短信吗?

I'll elaborate - I have a java application running on a Tomcat server. I also have an Android emulator running on the same machine. I can send SMS messages from the application to the emulator using the "sms send" command. Can I also receive SMS messages in some way?

推荐答案

telnet localhost <port number>对我不起作用.

这对我有用:

运行模拟器,然后单击更多".这是模拟器窗口右侧的三个水平点.

Run an emulator and click "More." That's three horizontal dots to the right of the emulator window.

然后单击电话".

输入您要用来接收文字的电话号码和文字. 按下[传送讯息]

Type a phone number from which you'd like to receive a text and the text. Press "Send message"

现在您看到您的消息了.

Now you see your message.

来源: https://developer.android.com/studio/run/emulator.html#console ,表格使用扩展控件,设置和帮助",电话"行.

Source: https://developer.android.com/studio/run/emulator.html#console, the table "Working with the Extended Controls, Settings, and Help," the row "Phone."

这篇关于是否可以从Android模拟器接收短信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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