When we are trying to test SMS based program on Android, we have to simulate receiving SMS. Fortunately, with new SDK, we can simulate the SMS come to Emulator. We have just to connect to emulator using telnet and there we can emulate the SMS. Below step by step to emulate the SMS:
- Start the emulator, you free to give the option, For example just type emulator on shell prompt
- Open a new shell and type :
to know the port emulator used. The console of the first emulator instance running on a given machine uses 5554 port, The command above just to make sure which port the instance used.
- Connect to the console using telnet command like:
telnet localhost 5554
- After you have come to the shell you can emulate sms with command:
sms send <phonesender> <text message>