Start your Android simulator in Eclipse IDE.
Step 2
Identify the port number on your simulator. Port number will display on the title bar of the simulator. By default it is 5554. (In my example AAA is the virtual device name I gave by the time I was creating it.)
Step 3
Open command prompt and type "telnet" and press enter. It will start Microsoft telnet client. (Refer the picture below.)
NOTE:
In case if you received a error message like this:
Please go to Control Panel -> Programs and Features -> click the link on left side called "Turn Windows features on or off".
- So a window will popup with all the Windows features.
- Find and check the check box of the entry named "Telnet Client" -> Click OK.
- There will be a process of installing the feature. (It might take some time and might need your Windows installation CD/DVD)
- If the installation process is success, then try the Step 3 again.
Step 4
Command prompt will change it's prompt from "C:\>" to "Microsoft Telnet>"
Now we are ready to communicate with the Android emulator. In order to make the connection to the emulator through Telnet; give this command:
o<Space>localhost<space>[Emulator Port Number]
Example: o localhost 5554
NOTE: "o" in the command is NOT the number zero. It's the alphabetical character.
Now you are ready to send the SMS.
Try this command to send the SMS to the emulator
sms<Space>send<Space>[Sender's Phone Number]<Space>[SMS Message]
Example: sms send 0776708037 HelloWorld

NOTE: Sender's number can contain only numbers and it doesn't have to be a valid phone number.
If you received the OK as above screen, your SMS has been successfully sent to the Android emulator.
Go to the "Messaging" app in the emulator, you will find the SMS sent from Telnet.
You can use this technique on your Android development, to test SMS related features.
-Happy Coding...




