I was wondering if there is a way to receive an SMS from Android emulator, perhaps on a TCP port. I know it's possible to send SMS to emulator by opening a TCP socket on the emulator port and using "send sms" command, but is it also possible to receive an SMS this way?
I'll elaborate - I have a java application running on a Tomcat server. I also have an Android emulator running on the same machine. I can send SMS messages from the application to the emulator using the "sms send" command. Can I also receive SMS messages in some way?
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.
Now You can send an SMS or make a call using Emulator Control . In Eclipse go to window->show views->other->Emulator control . That is for sending/receiving SMS between built-in messaging application of the Android OS.
Launch the dialer application on the first emulator. As the number to dial, enter the console port number of the second emulator you'd like to simulate a call on. Press "Dial". A new inbound call appears in the second emulator instance.
Set up Messages for web On your computer, open Messages for web in a browser, like Chrome or Safari. Settings and toggle on Remember this device after you log in. Using your phone, tap Scan QR code and hold your phone up to the QR code on the web page. When it's ready, your phone will vibrate.
telnet localhost <port number>
didn't work for me.
This worked for me:
Run an emulator and click "More." That's three horizontal dots to the right of the emulator window.
Then click "Phone".
Type a phone number from which you'd like to receive a text and the text. Press "Send message"
Now you see your message.
Source: https://developer.android.com/studio/run/emulator.html#console, the table "Working with the Extended Controls, Settings, and Help," the row "Phone."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With