Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User borisman2's Avatar
    Join Date
    Dec 2007
    Posts
    3
    Hello. I have two Series40 phones - Nokia/7500(5 ed.) and Nokia/6288(3 ed.)

    1. I create player using locator capture://image
    Player player = Manager.createPlayer("capture://image");
    2. I obtain VideoControl
    VideoControl vc = (VideoControl) player.getControl("VideoControl");
    I display it in full screen on a canvas.
    3.I realize and start camera
    player.realize();
    player.start();
    Now I can CLEARLY can see the image on screen.
    4. I'm trying to get image by calling:
    byte[] data = vc.getSnapshot("image/jpeg");
    or
    byte[] data = vc.getSnapshot(null);

    Both calls results the same - data becomes null.

    Note that capture://video does not work for image capturing on Series 40.

    Also please note that this code is returning null even on Nokia emulator.

    Finally, if I change locator to capture://video, then this code works perfectly on Nokia/N72 (Series 60) and 4 different Sony-Ericsson devices (K750, Z530, W850, K850)

  2. #2
    Registered User borisman2's Avatar
    Join Date
    Dec 2007
    Posts
    3
    OOPS!

    http://discussion.forum.nokia.com/fo...p/t-78634.html

    I've got exactly same error. I close camera before capturing image, because on SonyEricsson there is no other way to show user that camera is busy

  3. #3
    Registered User borisman2's Avatar
    Join Date
    Dec 2007
    Posts
    3
    This question is RESOLVED

  4. #4
    Registered User tyler45's Avatar
    Join Date
    Jan 2009
    Posts
    40
    How did you solved it?
    Quote Originally Posted by borisman2 View Post
    This question is RESOLVED

  5. #5
    Regular Contributor Steel_BRS's Avatar
    Join Date
    May 2008
    Location
    Copenhagen, Denmark
    Posts
    84
    My experience is that Nokia Series 40 handsets don't specify resolution in System.getProperty("video.snapshot.encodings")

    So I fall back to my default encoding string:
    Code:
        byte[] capturedImageBytes = videoControl.getSnapshot("encoding=jpeg&width=480&height=640");
    This works on Nokia 5200, 3110 Classic, 6500 Classic, 5310 XpressMusic, etc.

    /Steel

  6. #6
    Registered User tyler45's Avatar
    Join Date
    Jan 2009
    Posts
    40
    Hello Steel,I looked at before posts and i am sure that now Nokia S40 dont supports.

    Bu you have written that 3110 Classic. Are you sure that this works?

    Because Our company will buy 200 phones related with encoding.

    Quote Originally Posted by Steel_BRS View Post
    My experience is that Nokia Series 40 handsets don't specify resolution in System.getProperty("video.snapshot.encodings")

    So I fall back to my default encoding string:
    Code:
        byte[] capturedImageBytes = videoControl.getSnapshot("encoding=jpeg&width=480&height=640");
    This works on Nokia 5200, 3110 Classic, 6500 Classic, 5310 XpressMusic, etc.

    /Steel

  7. #7
    Regular Contributor Steel_BRS's Avatar
    Join Date
    May 2008
    Location
    Copenhagen, Denmark
    Posts
    84
    Quote Originally Posted by tyler45 View Post
    Hello Steel,I looked at before posts and i am sure that now Nokia S40 dont supports.

    Bu you have written that 3110 Classic. Are you sure that this works?

    Because Our company will buy 200 phones related with encoding.
    Hi Tyler

    Yes, there's no question - MMAPI and getSnapshot works on the before mentioned Nokia Series 40 phones.
    Perhaps you have some sort of preinstalled certificate & security policy from your network operator, which doesn't allow your midlet to access the camera?

    Do you get a dialog up saying something like 'Allow access to multimedia?'
    I don't have the Nokia phones here, so I can't remember the dialog exactly, but it works. I'm absolutely sure of that.

    /Steel

  8. #8
    Registered User tyler45's Avatar
    Join Date
    Jan 2009
    Posts
    40
    Hi Steel;
    I have found this document. MEDIA API
    We will try 3110. Thanks for your kindly message.
    Best Regards

    Quote Originally Posted by Steel_BRS View Post
    Hi Tyler

    Yes, there's no question - MMAPI and getSnapshot works on the before mentioned Nokia Series 40 phones.
    Perhaps you have some sort of preinstalled certificate & security policy from your network operator, which doesn't allow your midlet to access the camera?

    Do you get a dialog up saying something like 'Allow access to multimedia?'
    I don't have the Nokia phones here, so I can't remember the dialog exactly, but it works. I'm absolutely sure of that.

    /Steel
    Releated Mobile Development to My Blog
    http://blog.erayince.com

  9. #9
    Registered User edprado's Avatar
    Join Date
    Aug 2009
    Posts
    15
    anyone resolved this problem??? I'm freaking out about it!

    Only getSnapshot(null) works. and when I get a snapshot and use drawImage(...) the photo is so small(thats to bad).



    i'm using nokia s40

Similar Threads

  1. Nokia device/simulator contact Vcard UID returns null
    By nareshl in forum Mobile Java General
    Replies: 14
    Last Post: 2009-10-30, 07:09
  2. Replies: 0
    Last Post: 2006-08-11, 08:45
  3. global root overflow(please help)
    By sushant_125 in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2004-05-14, 08:24
  4. Series 60 Asking Select Access Point in every HttpConnection
    By yilmazalperen in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2003-12-18, 16:11
  5. Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working
    By mattbee in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-06-10, 11:43

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