Reputation: 3108
Before Android Studio 2.0, I could send SMS messages between emulators using their emulator ids (see: https://stackoverflow.com/a/4726121/212508). However this method is not working on new emulators with the panel on the right side.
Is it possible to send SMS messages between new Android Emulators(2.x)?
Note: I want to send the message from emulator to emulator. Not through telnet or ADM.
Upvotes: 7
Views: 1949
Reputation: 1836
Ugrading to the most recent Preview Android SDK Build Tools solves the problem.
Android SDK Tools 25.2.2 rc1
Be sure to enable "Preview Tools" in the settigns.
Upvotes: 0
Reputation: 1764
Write this code and run application in Emulator 5554.
PendingIntent pi;
SmsManager sms;
String msg = "android.telephony.SmsManager.STATUS_ON_ICC_SENT";
PendingIntent piSent = PendingIntent.getBroadcast(MainActivity.this, 0,new Intent(msg), 0);
sms = SmsManager.getDefault();
sms.sendTextMessage("5556", null, "This is sample test message", piSent, null);
Upvotes: 1
Reputation: 304
I'm facing the same problem. It looks that it is a known bug, you can find it here: https://code.google.com/p/android/issues/detail?id=210767
Looks like they have solved it, and will add the fix on future versions.
Meanwhile I haven't found any way to solve it...
Upvotes: 7