Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User anand_amarsh's Avatar
    Join Date
    May 2003
    Posts
    47
    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 Linuxhippy's Avatar
    Join Date
    Apr 2004
    Posts
    20
    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 nmittal's Avatar
    Join Date
    Mar 2003
    Posts
    393
    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 sendal's Avatar
    Join Date
    Jul 2008
    Posts
    13
    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
  •  
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