Interacting with Emulators

DDMS can send a number of events, such as simulated calls, SMS messages, and location coordinates, to specific emulator instances. These features are found under the Emulator Control tab in DDMS. These events are all "one way," meaning that they can be initiated from DDMS, not from the emulator to DDMS.

These features work for emulators only, not for handsets. For handsets, you must use real calls and real messages.

Simulating Incoming Calls to the Emulator

You can simulate incoming voice calls by using the DDMS Emulator Control tab (see Figure 2.5). This is not a real call; no data (voice or otherwise) is transmitted between the caller and the receiver.

FIGURE 2.5

Using the DDMS Emulator Control tab (left) to place a call to the emulator (right).

Try It Yourself

Simulate an Incoming Call to an Emulator

To simulate an incoming call to an emulator running on your machine, follow these steps:

1. In DDMS, choose the emulator you want to call.

2. On the Emulator Control tab, input the incoming phone number (for example, 5551212) in the Telephony Actions section.

3. Select the Voice radio button.

4. Click the Call button.

5. In the emulator, you should see an incoming call. Answer the call by clicking the Send button in the emulator.

6. End the call at any time by clicking the End button in the emulator or by clicking the Hang Up button on the DDMS Emulator Control tab.

Simulating Incoming SMS Messages to the Emulator

You can simulate incoming SMS messages by using the DDMS Emulator DDMS (see Figure 2.6). You send an SMS much as you initiate a voice call.

FIGURE 2.6

Using the DDMS Emulator Control tab (left) to send an SMS message to the emulator (right).

FIGURE 2.6

Using the DDMS Emulator Control tab (left) to send an SMS message to the emulator (right).

Try It Yourself

Send an SMS to the Emulator

To send an SMS message to an emulator running on your machine, follow these steps:

1. In DDMS, choose the emulator you want a send an SMS to.

2. On the Emulator Control tab, input the Incoming phone number (for example, 5551212) in the Telephony Actions section.

3. Select the SMS radio button.

4. Type an SMS message.

5. Click the Send button. In the emulator, you should see an incoming SMS notification.

0 0

Post a comment