×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Nov 2010
    Location
    Rimini Italy
    Posts
    3

    switch-off camera after the snapshot to save battery

    Please,might somebody suggest me if with java there the possibility to turn off the camera after captured a photo.
    Analizing the battery current any app that is just running without peripherals take 10mA with camera 200mA.
    In jsr135 i don't have find the solution. I would realize an app that take pictures every 20 min during the day and send image on web. Some app similar are existing but the camera and data comm remain opened during the pause ,in this way the battery life is reduced a lot.
    thanks for any helps

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: switch-off camera after the snapshot to save battery

    Quote Originally Posted by bunkerrimini View Post
    Please,might somebody suggest me if with java there the possibility to turn off the camera after captured a photo.
    Analizing the battery current any app that is just running without peripherals take 10mA with camera 200mA.
    In jsr135 i don't have find the solution. I would realize an app that take pictures every 20 min during the day and send image on web. Some app similar are existing but the camera and data comm remain opened during the pause ,in this way the battery life is reduced a lot.
    thanks for any helps
    Welcome to Forum Nokia Java Db!

    If you close the app the camera stops, so just close app and restart the app after every 20 min using PushRegistry Alarm of 20mins delay.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Registered User
    Join Date
    Nov 2010
    Location
    Rimini Italy
    Posts
    3

    Re: switch-off camera after the snapshot to save battery

    Thanx im2amit! I'll try to use the PushRegistry to solve my problem.
    If i understood,u suggesting me to write a main midlet that launch every 20 min another midlet, it will make a snapshot and send the image on web and then destroy by itself.
    I would realize a surfwebcam to put in the sea close to the beach. I wont use a solar panel to give the power supply to the phone and keep it on charge during the day.
    Visit my website http://www.bunker-rimini.com/bunker-...nemometro.html

  4. #4
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: switch-off camera after the snapshot to save battery

    Not exactly. You do not need separate applications. The process could be something like: The user starts your application, the app takes the image, sends it over the network, registers itself to be waken up in 20 minutes (using PushRegistry) and exits itself. After 20 minutes the app starts again, takes the image...etc.

    There is a problem in here though. Java ME security. Your application basically needs to use APIs which are "protected" (taking image, sending stuff over network, and starting itself). This means that the system asks the user to accept the actions (either every time, once per application session, or never). This makes running this system impossible, unless you sign the MIDlet (every time the application is started again, taking image would require the user to confirm the action.... you get my point...?)
    Unfortunately even signing might not be enough. The following is an excerpt from MIDP spec
    Additionally, the Blanket setting for Application Auto Invocation and the Blanket setting for Net Access are mutually exclusive. This constraint is to prevent a MIDlet suite from auto-invoking itself, then accessing a chargeable network without the user being aware. If the user attempts to set either the Application Auto Invocation or the Network Function group to “Blanket” when the other Function group is already in “Blanket” mode, the user MUST be prompted as to which of the two Function groups shall be granted “Blanket” and which Function group shall be granted “Session”.
    I am afraid that you might run into problems because of these security permission issues...

    Hartti
    Last edited by hartti; 2010-11-24 at 01:09. Reason: added quotes

  5. #5
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: switch-off camera after the snapshot to save battery

    Yeah Hartti is correct indeed, Signing will not help to get rid of the permission that will be asked at the time of the invocation of the MIDlet using the Push Registry.

    I will recommend you that you give the control of the camera and all the other functionally to the user, let he get all the things ready and do it by his own control. If he wants to optimize the battery then he will close the camera after the snap else he will keep the camera open as long as the app is running,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: switch-off camera after the snapshot to save battery

    As you might run into problems because of security permission issues, try to do this type of unattended apps in Symbian which might get a work around for these Security Issues.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  7. #7
    Registered User
    Join Date
    Nov 2010
    Location
    Rimini Italy
    Posts
    3

    Re: switch-off camera after the snapshot to save battery

    Thanx at all! Nobody stay to the phone to operate to press yes to java perm request every 20 min, the cell will be fixed on a mast with a solar panel.
    It' s unbelievable that in a app i can't switch on and off the camera, or close the 3g connection if the data are already sended.

Similar Threads

  1. how to take camera snapshot ?
    By navjotsingh1979 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2011-02-13, 14:14
  2. Camera snapshot??
    By sphinxcs898 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2008-04-03, 19:02
  3. Camera snapshot on 3250
    By stefanosanna in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2006-05-04, 14:31
  4. Can I save the snapshot into the phone?
    By pop2518 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2005-10-05, 08:39
  5. Nokia 6600 & Snapshot: how to save image ?
    By andreas84 in forum Symbian
    Replies: 0
    Last Post: 2004-06-30, 08:25

Posting Permissions

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