Android: Send SMS to Emulator

Android: Send SMS to Emulator

The Android emulator has support for receiving text messages. You can send a SMS to an emulator by using the command line. So the first step is:

1. Be sure you have the Telnet Client feature on
To enable the Telnet feature on windows you have to make the following steps:

  • Go to Control Panel
  • Select Programs and Features
  • And from the left panel select Turn Windows features on or off
  • And now check the Telnet Client and/or server. (Actually the Telnet Server is not necessary but I usually enable it in case that I will need it sometime). Then press the OK button.
2. Open the Command Prompt (cmd) and write the following commands:
  • Type telnet and then press enter
  • Type open localhost 5554 and then press enter. The 5554 number is the port of the emulator. Usually the emulator runs on this port but it can be also 5556 or other. So you have to choose your emulator’s port. It can be read from the emulator’s title.
  • Now type the command for sending the SMS. The command is:
sms send YourPhoneNumber "YourMessage"
 
NOTE: Notice that sometimes the command is not recognized but as you can see in the above image you can try again and that it should work.
Your emulator can receive text messages now. So as a conclusion, we can send SMS to an Android emulator, but it has some limitations though.

The functional limitations of the emulator include:
  • No support for placing or receiving actual phone calls. You can simulate phone calls (placed and received) through the emulator console, however.
  • No support for USB connections
  • No support for device-attached headphones
  • No support for determining network connected state
  • No support for determining battery charge level and AC charging state
  • No support for determining SD card insert/eject
  • No support for Bluetooth
I hope this tutorial helped you!
, , , , ,
Previous Post
Android: ListView with SearchView
Next Post
Android Studio Graddle, add GooglePlayServices library

Related Posts

Menu