×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    1

    taking pictures in mobile phones with digital cameras through J2ME

    Greetings,

    I'm working on J2ME and I'm very interested in some mobile phones with J2ME capabilities (MIDP) and with digital camera devices incorporated. Nokia has a few mobile phones that have these features (7650,6650), and other ones that permit the attachment of a external camera, Nokia HS-1C, which completes the requirements (6100,6610,7210).

    In this context I would like to know if there is any Nokia J2ME specific API that permits to a middlet take a picture by a user request, since JNI is not part of CLDC (the MIDP's base configuration), we'll never be able to extend the MIDP features to support mobile native features!

    thanks for all your attention,

    regards,
    Pedro Salazar.

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    382

    RE: taking pictures in mobile phones with digital cameras through J2ME

    Hello

    First Model supporting
    Mobile Media API, JSR-135 is 3650
    which will be shipped into markets begining of 2003.

    more information about MMA:
    www.jcp.org/jsr/detail/135.jsp

    MM API allows taking Snapshot using Camera:

    Example:

    VideoControl vc;
    try {
    p = Manager.createPlayer("capture://video"
    p.realize();

    // Grab the video control and set it to the current display.
    vc = (VideoControl)p.getControl("VideoControl"
    if (vc != null) {
    Form form = new Form("video"
    form.append((Item)vc.initDisplayMode(vc.USE_GUI_PRIMITIVE, null));
    Display.getDisplay(midlet).setCurrent(form);
    }
    p.start();

    } catch (IOException ioe) { } catch (MediaException me) { }

    // now take a picture
    try {
    byte[] pngImage = vc.getSnapshot(null);
    // do something with the image ...

    } catch (MediaException me) { }

    Cameras supported formats is snapshots are: PNG, JPG, BMP

    I hope this help you

Posting Permissions

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