Logo Icon Logo
A Crowd-sourced Cookbook on Writing Great Android® Apps
GitHub logo Twitter logo OReilly Book Cover Art
Sending Text Messages and Placing Calls Between AVDsBack to Android Cookbook Home | Up to Chapter: Testing

Author: Johan Pelgrim ('jpelgrim')
In Published Edition? Yes
FormatLanguage: WikiFormat

Sending Text Messages and Placing Calls Between AVDs


You have made an app which needs to place or listen for calls or send or receive text messages and you want to test this.


Fire up two AVDs and use the process id to send text messages and place calls


When you create an app that listens for incoming calls or text messages -- like the one in recipe Do something when the phone rings -- you can of course use the DDMS perspective in Eclipse to simulate placing calls or sending text messages, but you can also fire up another AVD!

If you look at the AVD window title you see a number before your AVD's title. This is the port number which you can use to telnet to your AVD's shell (e.g. telnet localhost 5554). Fortunately for testing purposes this number is your AVDs phone number as well. So you can use this number to place calls

... or send text.

See Also

Do something when the phone rings