本文介绍了开发时在Android设备上模拟SMS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过Eclipse中的DDMS向我的Android手机发送短信.当我运行物理电话时,模拟器控件被禁用.我只能向模拟器发送短信.

Is there a way to send an SMS from te DDMS in Eclipse to my Android phone. The emulator control is disabled when I'm running my physical phone. I can only sent a SMS to the emulator.

推荐答案

下面的几个步骤应该可以帮助您模拟Android模拟器中的传入短信.

The following few steps should get you up into simulating an incoming sms in an Android Emulator.

1.确保PC上装有telnet客户端(无论是Windows还是Linux).如果没有安装telnet客户端,请参阅Google的安装指南.

1.Make sure that you have the telnet client in you PC whether it is Windows or Linux.Google around on how to install one if it is not already installed on your PC.

(a)打开CMD提示符并输入命令:

(a) open you CMD prompt and Enter the command:

telnet

目前,我正在使用Windows 7进行演示,因此您将获得

For now I am Demonstrating using Windows 7 ,so you will get

转义字符为'CTRL +]'

Escape Character is 'CTRL+]'

Microsoft Telnet>

Microsoft Telnet>

(b)假设您的仿真器已经启动.并且仍然在CMD上,键入:

(b)Assuming that your Emulator is already started.And while still on the CMD,type:

 o localhost 5554

这应该打开与仿真器的连接.

this should open a connection to the emulator.

(c)要模拟从诸如0123456的号码传入的短信,请输入:

(c)To Emulate an incoming sms from a number say 0123456 type:

sms send 0123456 Your Message

您应该能够在android模拟器收件箱中收到消息.多数民众赞成.

You should be able to get the message in your android emulator inbox.Thats all Folks.

这篇关于开发时在Android设备上模拟SMS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 09:34
查看更多