maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [ANNOUNCE] lens cover reminder (https://talk.maemo.org/showthread.php?t=52534)

ivnvir 2010-05-13 17:27

Re: [ANNOUNCE] lens cover reminder
 
Quote:

Originally Posted by smoku (Post 656896)
It's a hildon-desktop plugin. It does not launch any additional process.

isn't it a daemon?
it checks if it's open or not.. !? so it'll check every X seconds to show the status, or am I wrong?

nicolai 2010-05-13 17:35

Re: [ANNOUNCE] lens cover reminder
 
No, it is not a daemon.

It is a plugin module for the statusbar. Most of the time it does absolutly
nothing. It only registers function to be called on some events.
(open/close the lens cover and the screen lock).

nicolai

GameboyRMH 2010-05-13 17:47

Re: [ANNOUNCE] lens cover reminder
 
Great! I actually made a DECW widget to do something similar, but this is way better! :D

benh_n900 2010-05-13 18:03

Re: [ANNOUNCE] lens cover reminder
 
One possible piece of cool intelligence would be to set a timer after the vibration and recheck the status, then play a sound if it's still open after say 10 seconds.

Another cool feature would be to set a similar timeout to take a brightness reading from the camera (is it possible?) or take photo and analyse the darkness. If it is dark (like in a pocket, laying on a table etc) then it is probably covered and you really want to close the lens cover as it is at high risk of scratching/dust getting in, so then the sound should be played.

(and for those who don't want sound, they can set it to off, or a silent sound file)

CepiPerez 2010-05-13 18:54

Re: [ANNOUNCE] lens cover reminder
 
@benh_n900:
Check after a determinated time needs a timer, and it will drain the battery

@nicolai:
Try hildon_play_system_sound()

smoku 2010-05-13 19:18

Re: [ANNOUNCE] lens cover reminder
 
Quote:

Originally Posted by CepiPerez (Post 657282)
@benh_n900:
Check after a determinated time needs a timer, and it will drain the battery

Linux is an event driven system. You don't need to actively track time. Just tell the kernel "please wake me up in X seconds" and go to sleep. :)

You may see g_timeout_add () for more details.

smoku 2010-05-13 19:23

Re: [ANNOUNCE] lens cover reminder
 
Quote:

Originally Posted by benh_n900 (Post 657201)
One possible piece of cool intelligence would be to set a timer after the vibration and recheck the status, then play a sound if it's still open after say 10 seconds.

Good synthesis. I like the idea.

qwerty12 2010-05-13 19:42

Re: [ANNOUNCE] lens cover reminder
 
Quote:

Originally Posted by benh_n900 (Post 657201)
Another cool feature would be to set a similar timeout to take a brightness reading from the camera (is it possible?) or take photo and analyse the darkness. If it is dark (like in a pocket, laying on a table etc) then it is probably covered and you really want to close the lens cover as it is at high risk of scratching/dust getting in, so then the sound should be played.

Rather complicated for something that you can just check by reading the proximity sensor's state.

fpp 2010-05-13 21:28

Re: [ANNOUNCE] lens cover reminder
 
This happens to me all the time, so thanks for this small but hugely useful app !

mthmob 2010-05-13 21:45

Re: [ANNOUNCE] lens cover reminder
 
Brilliant :) Very needed indeed... Constantly forget to close it, mostly because im used to a digi cam that covers the lens automaticly when off :)

Thx for sharing your work with us :)

---

But maybe its time for the mobile developers to take a look at the digital camera designs out there... an auto open/close lens cover system has been used for years now... maybe its time to move this system to the mobile phones aswell :)


All times are GMT. The time now is 13:13.

vBulletin® Version 3.8.8