43

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?

sean
  • 9,198
  • 22
  • 65
  • 80

6 Answers6

98

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
Amokrane Chentir
  • 29,907
  • 37
  • 114
  • 158
Andi Krusch
  • 1,383
  • 8
  • 6
10

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.

Spencer Stream
  • 616
  • 2
  • 6
  • 22
Gajendra Bang
  • 3,593
  • 1
  • 27
  • 32
6

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

Subham93
  • 633
  • 8
  • 14
5

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

Aakash Anuj
  • 3,773
  • 7
  • 35
  • 47
3

open another emulator and check their numbers from the window title ex 5554:emulator name

and just simply type the number(5554) in "To" and hit send thats it

Yasin Hassanien
  • 4,055
  • 1
  • 21
  • 17
3

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.

Chris Stratton
  • 39,853
  • 6
  • 84
  • 117
  • Actually I've tried sending text message using the plugin in eclipse. However, when I tried to send a text message again it suddenly didn't work. I'm thinking if there are any ways in sending text messages in android emulator. – sean Dec 01 '10 at 15:09
  • Did you read the emulator documentation yet? There's an emulator console that you can connect to via a telnet application (or programmatically) and issue a variety of commands, including sending SMS – Chris Stratton Dec 01 '10 at 15:12