Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send SMS between Android emulators

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.

like image 796
b4da Avatar asked Jun 27 '16 08:06

b4da


People also ask

How can I send SMS from one emulator to another Android?

To send an SMS message to another emulator instance, launch the SMS application (if available). Specify the console port number of the target emulator instance as as the SMS address, enter the message text, and send the message. The message is delivered to the target emulator instance.

Can Android Studio emulator send SMS?

You can emulate sending SMS messages to the Android emulator using either the Dalvik Debug Monitor Service (DDMS) tool available in Eclipse, or the Telnet client.

Can Tasker send SMS?

What's a Tasker profile? A Tasker action is something that you want your phone to do: send a text message, change an audio level, turn Bluetooth on and so on.


2 Answers

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...

like image 138
algarrobo Avatar answered Oct 19 '22 22:10

algarrobo


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);
like image 24
Asif Patel Avatar answered Oct 19 '22 20:10

Asif Patel