Incoming SMS as well as SMS related commands can be simulated in an emulator using command line terminal. Follow the steps to simulate SMS in emulator.
- Start the emulator.
- Open command line console and type “telnet“. Telnet client helps to connect to a remote server or a system.
- Connect the localhost using telnet by typing the following command “o localhost 5554” . The default port in which the emulator is operating is 5554.
- Successful connection will display the following message in console “Android Console: type ‘help’ for a list of commands
- The syntax for sending SMS is “sms send <NUMBER> <TEXT>“
- For example : sms send 12345 Hai
On successful execution of the command SMS alert can be seen in the emulator.