×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Dec 2005
    Location
    Spain
    Posts
    8

    UNI-01. How to detect that the system request to release the camera???

    Hi!
    I need help to pass Step 6 of the UNI-01 Test Case.
    I have an app that record video from the camera, but I have to release it if other app need the camera to run, according with the Test Criteria:
    RESULT: The application allows other applications access to sufficient OS resources to run, i.e. the application shuts down/release resources if the system requests it to do so.
    My problem is that I don't know how to detect the system request me to release the resource (the camera).
    I have seen a possible solution in this article, but I don't want to stop recording every time my app goes to background (just when neccesary).

    In other way, I have seen that in MCameraObserver2 there is a member HandleEvent() that maybe gives this information, but I read that this interface is not implemented in most of mobile phones. In fact, it's a bit weird because some useful members like PowerOnComplete() or ReserveComplete() provided in MCameraObserver, are missing in MCameraObserver2.

    Any idea???

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: UNI-01. How to detect that the system request to release the camera???

    I think it would be sensible to assume that no application should request it unless they are also using the screen at that time, so you could implement the camera releasing according to the focus events. So if you are using the camera and you are sent to background, you would then release it, and take it back only when you gain focus again.

  3. #3
    Registered User
    Join Date
    Dec 2005
    Location
    Spain
    Posts
    8

    Re: UNI-01. How to detect that the system request to release the camera???

    I know that showing the images recorded on the screen is the normal use, but not the only one.
    I.e. you can use the camera to record a video, or to make a videoconference (this is my case). In this situations, it could be acceptable to stop the camera if the app is in background, but it is not the dessirable behaviour.
    For example, if I want to send a picture via MMS to the person I'm having a videoconference session with.
    Or more important, the other people in the videoconference lose video without knowing why (it could seem a system failure).
    Etc.

    My qestion is: Is there any way to detect that other app is requesting the camera?? I want to think that the answer is yes, but I was not able to find it.
    For instance, at first sight to the Symbian OS Reference I saw HandleResourceChange() method that was encouraging to me, but at the end, it didn't cover my needs.

    Any idea?

    Thank you all.
    Last edited by abel.campos; 2008-03-14 at 09:02.

  4. #4
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: UNI-01. How to detect that the system request to release the camera???

    If your application is in background with there are two options: you release the camera resource or you keep it on if the use case requires this behavior. Knowing that another application requires camera access is not going to help since you claim that your application cannot release the camera anyhow.

    So make sure that you document your application's behavior, you let the user know that while your application is running (in background) no other application can reserve that camera and this should grant you a waiver/exception for the Symbian Signed testing.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

Similar Threads

  1. Nokia N-Series Complete Model Line-Up
    By Dopod in forum General Development Questions
    Replies: 6
    Last Post: 2008-07-22, 20:16
  2. Camera API on Symbian 9.1 (Nokia N80)
    By srigans1 in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2007-10-20, 05:31
  3. screen rotating affect camera function?
    By whitewinds in forum Symbian Media (Closed)
    Replies: 5
    Last Post: 2006-03-20, 20:41
  4. Detect N70/6680 camera slide
    By ppiggy in forum Symbian
    Replies: 3
    Last Post: 2005-11-04, 10:12
  5. embedable camera application??
    By zhengyu97 in forum Symbian
    Replies: 0
    Last Post: 2005-04-22, 11:09

Posting Permissions

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