Skip Headers
Oracle® Java Micro Edition Software Development Kit Developer's Guide
Release 3.0.5 for Windows
E24265-04
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

31 JSR 253: Mobile Telephony API

The Mobile Telephony API (MTA) specification (http://www.jcp.org/en/jsr/summary?id=253) defines a set of functions for controlling voice calls and using network services. Because the MTA is optimized for small devices with limited memory and processing power, these functions are effective for Java ME applications written for many devices.

31.1 The MTA Implementation

Although JSR 253 can be based on any available telephony protocol, the specification describes only the GSM, UMTS and CDMA protocols. The OJWC implementation provides the ability to add support of any protocol. For details on the implementation, see the Oracle® Java Wireless Client Porting Guide at http://download.oracle.com/javame/config/cldc/cldc-opt-impl/ojwc-3.0.

In the Java ME SDK the reference implementation is only able to receive external MTA events generated by the Mobile Telephony panel. In the SDK, launch an emulator and select Device > Mobile Telephony. The controls on this external events generator tab are reserved for TCK testing.

The Java ME SDK integrates a server and other infrastructure so that you can exchange MTA events between emulators without using the external events generator. See Section 31.2, "Running the MtaDemo".

31.2 Running the MtaDemo

This sample project demonstrates how the Java ME SDK MTA features can be used to simulate telephony actions. JSR 253 does not address presentation issues and UI issues. The behaviors described here are those of the sample application. Also, this sample focuses on call functionality and call state changes. It has no audio capability.


Note:

In this simulation, when the caller terminates a connection the destination device connection is not terminated automatically. Both the caller and the call recipient must manually terminate the connection. This is necessary because of a bug in the OJWC implementation.


  1. In the Projects tab, Right-click MtaDemo and select Run With... and select DefaultCldcPhone1 (Device 6) from the dropdown menu.

    Repeat this process to launch MtaDemo on DefaultCldcPhone2 and DefaultCldcPhone3 (Devices 7 and 8, respectively).

  2. In each emulator, select the MtaDemo MIDlet to install the application. The initial screen shows this control

    Description of mta_init.gif follows
    Description of the illustration mta_init.gif

  3. From the Device 6 emulator place a call to Device 7. Type 123456790 in the Phone field, and press Connect.

  4. The Device 7 emulator displays a notification to accept or reject the call. Press the Accept soft button.

    The Active sessions dropdown is shown on Devices 6 and 7. The active session is shown in bold font.

    Note the state change and address are recorded in the Output window for both emulator sessions.

  5. From Device 8 place a call to Device 7.

  6. The Device 7 emulator displays a prompt to accept or reject the call. Press the Accept soft button.

    The initial call is automatically set on hold. The held connection is shown in italics in the Active sessions dropdown.

    Description of mta3_1hold.gif follows
    Description of the illustration mta3_1hold.gif

  7. On Device 7, select the active session from device 8 (123456791) and from the soft Menu, choose Terminate.

  8. On Device 8, terminate the active session.

  9. On Device 7, choose the held active session (123456790) and from the soft Menu, select Set on Active.

This covers the basic transactions in the MtaDemo. At this point you can manually put a call on hold by choosing Set on Hold, and then initiate a call to a device that has no active sessions. If the device has an active session, you will see the error "Maximum number of active calls reached" in the emulator and in the output window.