Sending and receiving text using android emulator [closed]

I'm currently developing android application which includes text messaging. Is it possible to send and receive text messages just by using android emulator? If yes, how can I do it?


Solution 1:

It's quite easy:

  • open a console
  • connect via telnet to the running emulator: telnet localhost 5554 (you can find the portnumber in the title of the emulator)
  • type this: sms send senderPhoneNumber textmessage

Solution 2:

You can also use two emulators. Open both emulators simultaneously. They will be named emulator-5554 and emulator-5556.

Then from one device, text (555)521-555x, where the last 4 digits are the number from the emulator name. This will allow you to text between both devices.

Solution 3:

If you use Eclipse, its pretty easy. 1 1) Goto DDMS.

2) There, the left pane will consist of list of emulators active, select your emulator and then in the right pane you will get Emulator Control->Telephony action-> Incoming Number, Message. Type these and hit send.

3) In your emulator you will receive message.

Cheers :) DDMS

Solution 4:

If you are working on windows: 1. Install the telnet client via the command prompt by typing

pkgmgr /iu:"TelnetClient"

2. Type telnet localhost 5554 . Here 5554 is the number that appears in the title of the emulator.

  1. Type sms send 1234 "message"

You are done ! Cheers ! Check your emulator for the received message

Solution 5:

If you read the emulator documentation, you will see that you can send and receive text messages between the environment within the emulator and the emulator console.

Actually sending them out into the real world would require that you have an sms gateway service somewhere and write something to move traffic between that and the emulator.