Is there a way to send an SMS from te DDMS in Eclipse to my Android phone. The emulator control is disabled when I'm running my physical phone. I can only sent a SMS to the emulator.
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.
To install it, type the following command line in the Windows command prompt: pkgmgr /iu:”TelnetClient”. To send an SMS message to the emulator, use the following command: sms send +651234567 Hello my friend!
The user can tap the messaging icon in your app to send the message. In the messaging app launched by the intent, the user can tap to send the message, or change the message or the phone number before sending the message. After sending the message, the user can navigate back to your app using the Back button.
The newest way in 2019:
I hope in 2020 we'll be able to simulate SMS on real devices (if it's legal)
The following few steps should get you up into simulating an incoming sms in an Android Emulator.
1.Make sure that you have the telnet client in you PC whether it is Windows or Linux.Google around on how to install one if it is not already installed on your PC.
(a) open you CMD prompt and Enter the command:
telnet
For now I am Demonstrating using Windows 7 ,so you will get
Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet>
(b)Assuming that your Emulator is already started.And while still on the CMD,type:
o localhost 5554
this should open a connection to the emulator.
(c)To Emulate an incoming sms from a number say 0123456 type:
sms send 0123456 Your Message
You should be able to get the message in your android emulator inbox.Thats all Folks.
Yeah it doesn't seem like it is possible. With the emulator you can do:
telnet localhost 5554
sms send +12345 A quick brown fox.
But if you try it with a real phone (well I tried a Galaxy S2) it just closes the connection. Of course it's always possible Samsung screwed up the code somewhere, but as common as that is, I think in this case the functionality is probably disabled for non-debug ROM builds.
I am not sure about what versions of android or adb support this you can try
adb emu sms send [from] [message]
so for example
adb emu sms send "+1555....." "Your message goes here....."
Hope this helps.
PS: I think this only works with emulators.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With