发送SMS文本消息从Android模拟器到第二个仿真实例

问题描述:

我试图以编程方式发送短信从一个Android模拟器,另一个在Mac OSX。我可以远程登录到第一和发送短信到第二位:

I am trying to send sms programmatically from one android emulator to another on Mac OSX. I am able to telnet into the first and send a text message to the second with:

sms send 5556 test

但......我无法从Android应用程序发送短信,这里是我用来测试:

but... I am not able to send an sms from an android application, here is what I am using to test:

SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phoneNumber, null, message, null, null);

在phoneNumber的= 5556和消息=测试。任何帮助将大大AP preciated。谢谢你。

the phoneNumber = 5556 and message = "test". Any help would be greatly appreciated. Thanks.

我最终开始从的第二的仿真器的应用程序。也就是说,从5556并成功发送短信到第一个仿真器,我开始,到5554我不知道为什么它不会从发送第一个仿真器,我开始。但尽管如此,它的工作。

I ended up starting the application from the second emulator. That is, from 5556 and it successfully sent an sms to the first emulator I started, to 5554. I don't know why it would not send from the first emulator I started. But nonetheless, it worked.