×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    2

    Post Avoiding "yes/no" on VideoControl.getSnapshot

    Hi everyone,

    I am trying to get a picture using with a Java2ME application (model Nokia 6101).

    I have managed to get the picture successfully but I need to get rid of the "yes/no" output question of the VideoControl.getSnapshot method, for I need to get the picture remotelly and there will be no one to "push to button".

    Is that possible to force "yes" on that output question? If so, can anybody send me any code?

    Thanks in advance.

    Jonio.

    here does the code:

    mDisplay = Display.getDisplay(this);
    mDisplay.setCurrent(mMainForm);
    try {
    mPlayer = Manager.createPlayer("capture://video");
    mPlayer.realize();

    mVideoControl = (VideoControl) mPlayer.getControl("VideoControl");

    Canvas canvas = new CameraCanvas(this, mVideoControl);
    mDisplay.setCurrent(canvas);
    mPlayer.start();

    // wait 5 seconds..
    Thread.currentThread().sleep(500);

    // Get the image.
    byte[] raw = mVideoControl.getSnapshot(null);
    Image image = Image.createImage(raw, 0, raw.length);
    Image thumb = createThumbnail(image);

    // Place it in the main form.
    if (mMainForm.size()>0 && mMainForm.get(0) instanceof StringItem)
    mMainForm.delete(0);
    mMainForm.append(thumb);

    // Flip back to the main form.
    mDisplay.setCurrent(mMainForm);
    }
    catch (IOException ioe) { handleException(ioe); }
    catch (MediaException me) { handleException(me); }
    catch (InterruptedException ie) { handleException(ie);}

  2. #2
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,430

    Re: Avoiding "yes/no" on VideoControl.getSnapshot

    Hi jonio.roberto! Welcome to Nokia Developer Discussion Boards!!

    Signing the MIDlet will make it trusted and remove the permission messages(Yes/No). Also remember that the user has to manually change the API access settings to "Always allowed" after the application has been installed even if the MIDlet has been signed.

    Have a look at MIDP 2.0: Signed MIDlet Developer's Guide v2.0
    http://www.forum.nokia.com/info/sw.n..._0_en.pdf.html

    Regards
    Gopal

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    2

    Re: Avoiding "yes/no" on VideoControl.getSnapshot

    Hi Gopal,

    Thanks a lot!!!

    Rgds.

    Jonio.

Similar Threads

  1. avoiding automatic command mapping
    By codsw2 in forum Mobile Java General
    Replies: 3
    Last Post: 2009-11-22, 12:57
  2. Avoiding the Location capability
    By storsjo in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 14
    Last Post: 2009-05-28, 23:19
  3. Using platformRequest method avoiding prompting for user acceptance!!!
    By Summerman in forum Mobile Java Networking & Messaging & Security
    Replies: 5
    Last Post: 2006-09-25, 23:59
  4. Avoiding automatic alerts that appear in the display when you run a MIDlet?
    By Summerman in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2006-05-20, 16:06
  5. Changing and avoiding focus between controls
    By julien.tranchant in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-12-14, 16:03

Posting Permissions

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