Namespaces
Variants
Actions

How to make a telephone call from Java ME

Jump to: navigation, search
SignpostIcon MobilePhone 52.png
Article Metadata

Article
Created: wang_shui (21 Mar 2007)
Last edited: hamishwillee (18 Jul 2012)

A telephone call can be made from a Java ME application by using javax.microedition.midlet.MIDlet.platformRequest().

On some devices the MIDlet has to be closed (for example on Series 40 devices), before the phone call can be placed. The application can take this into account by checking the return value of this method call. The value is true, if the MIDlet suite MUST first exit before the call can be made.

It is also possible to send post-dial DTMF tones along the phone number. However, it is not usually possible to send a DTMF tones sequence to operator service from a MIDlet.

On some devices (on Series 40 side) the length of the dial-string is limited.

The following code is used for making the telephone call

String telNo = "tel:+9682651761543";
platformRequest(telNo );

It should also be noted that user is also provided means to initiate a phone call from MIDP LCDUI PHONENUMBER type TextField or TextBox. User is also able to fetch a number from native phone book (or contacts) application to this type of TextField/TextBox. The Call and Fetch operations are available in Options menu or directly from softkeys depending whether there's also application provided Commands in the same Displayable, or Form Item in the case of TextField.

This page was last modified on 18 July 2012, at 09:28.
135 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved