×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    20

    Initiating a phone call

    Hi, Is there any chance to initiate a phone call from within a Java MIDLet?
    Thanks Roland

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    67
    Hi!

    Using MIDP2.0 you could use the platformRequest method with a url like "tel:<NUMBER>"

    Hope this helps.

    Regards
    Bjoern

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    17

    platformRequest

    This is not available on some firmware versions eg 6600 3.42.???

    Can anybody tell me which devices really support it??

    thanks in advance

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    67
    Hi!

    Yes on the 6600 with old firmware calling platformRequest doesn't work. With 4.09 and above it work's like a charm.

    platformRequest should work on any MIDP2.0 enabled device. On some devices the midlet has to terminate to actually initiate a phone call or open an url.

    Regards
    Bjoern

  5. #5
    Registered User
    Join Date
    Sep 2003
    Posts
    17

    initiate call

    Thanks for the tip. Will have to check the app out on real devices to be sure.

  6. #6
    Registered User
    Join Date
    Sep 2005
    Posts
    21

    Re: Initiating a phone call

    Please tell me whats wrong in the below code...

    String url = "tel:919444317263";
    try{
    graphics.drawString(url.toString(),5,20,Graphics.TOP|Graphics.LEFT);

    midlet.platformRequest(url);

    }catch(Exception e){

    graphics.drawString(e.toString(),15,40,Graphics.TOP|Graphics.LEFT);
    }


    When the above code is seen in emulator it gives java.nullpointer.excep..

    Else kindly provide me the code to initiate a call from MIDLET.

  7. #7
    Nokia Developer Champion
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: Initiating a phone call

    in the code above, npe can come from either graphics or midlet
    and if it s thrown without being catched, it is probably the graphics.
    make sure these have valid values
    that's all i can with info you give

    last thing, you should print the messages to system.out while running on emulator, it rediuce possibilities of mistake

Posting Permissions

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