Reputation: 2835
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
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);
the phoneNumber = 5556 and message = "test". Any help would be greatly appreciated. Thanks.
Upvotes: 1
Views: 7364
Reputation: 2835
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.
Upvotes: 1
Reputation: 10533
Have you set the SEND_SMS permission in the Manifest?
<uses-permission android:name="android.permission.SEND_SMS" />
Upvotes: 0