是否可以从Android模拟器接收短信?

是否可以从Android模拟器接收短信?,第1张

概述我想知道是否有办法从 Android模拟器接收短信,也许在TCP端口上. 我知道可以通过在仿真器端口上打开一个TCP套接字并使用“send sms”命令来发送短信到模拟器,但是这样也可以接收短信? 我会详细说明 – 我有一个运行在Tomcat服务器上的java应用程序.我也有一个在同一台机器上运行的Android模拟器.我可以使用“sms send”命令从应用程序发送短信到模拟器.我也可以以某种方 我想知道是否有办法从 Android模拟器接收短信,也许在TCP端口上.
我知道可以通过在仿真器端口上打开一个TCP套接字并使用“send sms”命令来发送短信到模拟器,但是这样也可以接收短信?

我会详细说明 – 我有一个运行在Tomcat服务器上的java应用程序.我也有一个在同一台机器上运行的AndroID模拟器.我可以使用“sms send”命令从应用程序发送短信到模拟器.我也可以以某种方式接收短信吗?

解决方法 朋友,请参考博客中提供的这个答案(从 authentication token does not match ~/.emulator_console_auth_token附加的信息)

Just connect the emulator using telnet and there we can emulate SMS. Below are the steps to emulate SMS:

Step 1: Start the emulator (with any desired options). Open a new terminal / command shell and type :

adb devices

Note the number after emulator (emulator-5554). This is the port number.

Step 2: Connect to the console using the telnet command:

telnet localhost 5554

Step 3: You will then need to authenticate the session. Find the auth_token in ~/.emulator_console_auth_token and copy the text in the file. Return to the telnet console and enter:

auth {contents_of_token_file}

Step 4: After you have authenticated the shell you can emulate SMS with the command:

sms send <phonesender> <textmessage>

更多信息请参阅此link

如果您从仿真器发送短信,请参阅此http://mobiforge.com/developing/story/sms-messaging-android

总结

以上是内存溢出为你收集整理的是否可以从Android模拟器接收短信?全部内容,希望文章能够帮你解决是否可以从Android模拟器接收短信?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1131834.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存