×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Checking camera shutter

    Hi

    Is there any way to check if the camera shutter is open?

    I tried following the camera-based examples given in the Python Code Examples, but if the camera shutter is closed, instead of detecting it shut and informing the user, the camera continues to work, showing a dark image.

    And then, if one opens the shutter, the camera's native camera application starts - and then one has to quit the application, return to the original (Python) camera application, etc.

    Is it possible for the python module to detect that the lid is shut (shutter is closed), so that the application can inform the user about the camera being shut? Or is it a module that has to be written? Would make an interesting project..

    Thanks
    Kedar

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Checking camera shutter

    hello kedar

    AFAIK in PyS60 not possible yet.

  3. #3
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Checking camera shutter

    Is it possible in Symbian C or Open C?

    If yes, it should (technically speaking) be possible to create some kind of Python module that would do the same.
    Will try it out. Might be fun!

    Kedar

  4. #4
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,795

    Re: Checking camera shutter

    Quote Originally Posted by kedarm View Post
    Is it possible in Symbian C or Open C?
    Here is a Technical solution in Symbian C++ for 2nd Edition, I don't know if it works in 3rd edition devices.

    TSS000287 - Checking flip cover and camera positions from an application
    Pankaj Nathani
    www.croozeus.com

  5. #5
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Checking camera shutter

    Hi Pankaj,

    Sorry for pulling out this old post.

    I tried the example. It didn't work right for me. The wiki says the following -
    Checking the current position of flip cover:
    #include <hal.h> // link against hal.lib
    TInt dState; HAL::Get(HALData::EDisplayState, dState);
    When I try the same, I always get dState = 1! Has anyone here had any luck?

    I have asked this question on the Symbian C++ (General) forum. Hoping to create an extension once I figure that out.

    Thanks
    Kedar

  6. #6
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Checking camera shutter

    Hello all!

    I managed to figure this one out. It is possible to figure out the camera state. Will create a .pyd file and upload.

    Follow this post for more information on how it can be done. The method has worked on a N73.

    Thanks all!
    Kedar

Similar Threads

  1. Error in packaging process :(
    By a-eqla3 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2008-07-24, 20:33
  2. Nokia N-Series Complete Model Line-Up
    By Dopod in forum General Development Questions
    Replies: 6
    Last Post: 2008-07-22, 20:16

Posting Permissions

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