×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    47

    Dialling a phone number from J2ME midlet

    Hi everyone,

    Is there a way of dialling a phone number from a MIDP 1.0 midlet. The J2ME API says the following for the "Input Constraints" section for javax.microedition.lcdui.TextField API :

    PHONENUMBER
    The user is allowed to enter a phone number. The phone number is a special case, since a phone-based implementation may be linked to the native phone dialing application. The implementation may automatically start a phone dialer application that is initialized so that pressing a single key would be enough to make a call.

    I tried creating a form and adding a TextField to it with an intial phone number, but it behaves like a normal text box with the Edit option.

    I would appreciate any help on this. Sample could would be of greatest help.

    Cheers

  2. #2
    Registered User
    Join Date
    Apr 2004
    Posts
    20

    Hmm

    Its just there to valid that the entered text is a phone number, its not there to allow dialing....

    lg Clemens

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    393

    Phone Number Access & Dialing

    Hi,

    The input constraint PHONENUMBER leads to the access of the phonebook on some phones when the textfield is clicked by the end user. In order to call a phone number the MIDlet the phone has to be MIDP 2.0 compliant which supports the platform request API to call phone numbers, open web browsers etc.

    Regards,
    [N]/Forum Nokia

  4. #4
    Registered User
    Join Date
    Jul 2008
    Posts
    13

    Re: Dialling a phone number from J2ME midlet

    try something like this


    private void call(String number) {
    try {
    platformRequest("tel:" + number);
    } catch (ConnectionNotFoundException ex) {
    // TODO: Exception handling
    }
    }

    private void commandAction(Command c, Displayable d){
    call("08564232");
    }

    it work for me . ..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×