Tuesday, 18 November 2014

Simulating receiving an SMS from an Android Emulator

There are a couple of different ways to do it.

  1. Using DDMS: From Android Studio you can open up DDMS by clicking on the tiny android icon which says "Android Device Monitor" when you hover over it. A new window will open up which gives you access to DDMS (which is awesome - you can send SMS, make phone call, set GPS location, and a ton of other things). You can also launch DDMS from the command prompt (android-sdk-dir\tools\ddms.bat)
  2. Using telnet: (which is what DDMS uses internally). First find the console port number (number like 5554 displayed in the title bar of the android virtual device window), then telnet localhost <port-number>. After that there is a ton of stuff you can do including sending sms like so: send sms <senderNumber> <messageText>  See here for other capabilities.

No comments:

Post a Comment