maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   PocketLock (N9oo) (https://talk.maemo.org/showthread.php?t=71787)

F2thaK 2011-04-04 09:47

PocketLock (N9oo)
 
I have an idea but not the coding skills for an app:

"PocketLock."

When you put your N9oo in your pocket, it locks itself!
(When proximity sensor is covered.)
Possibly even unlocks itself upon removal from pocket.

Anyone interested in making such an app?



F2K.

vi_ 2011-04-04 09:52

Re: PocketLock (N9oo)
 
No.

1. This would require proximity sensor polling which is a massive drain on battery.

2. The proximity sensor is well known for how much it sucks balls (although few people have investigated the possibility of replacing resistor R1541 to alter it's sensitivity) and would be locking all the time in bright sunlight.

Otherwise, keep those ideas coming!

F2thaK 2011-04-04 09:57

Re: PocketLock (N9oo)
 
couldnt you lock screen with shortcutD though?

just thought about it, will hava look

lidow 2011-04-04 15:21

Re: PocketLock (N9oo)
 
There is similar program for N810 (autolock).
N810 does not have proximity sensor, so it is light sensor that is used.
Works pretty well there, I'm not sure if it is feasible to be ported to N900.

damnshock 2011-04-04 15:26

Re: PocketLock (N9oo)
 
Quote:

Originally Posted by vi_ (Post 981531)

1. This would require proximity sensor polling which is a massive drain on battery.

I thought the proximity sensor was always on whether we use it or not. Ain't it suppose to send a dbus signal (or something alike) when it's switched on?

Regards

vi_ 2011-04-04 15:34

Re: PocketLock (N9oo)
 
Quote:

Originally Posted by damnshock (Post 981724)
I thought the proximity sensor was always on whether we use it or not. Ain't it suppose to send a dbus signal (or something alike) when it's switched on?

Regards

Nope, while the proximity sensor is possibly 'on' at a very basic hardware level it is essentially ignored by the OS until somthing requests to read its condition. It does not cause a signal on dbus unless you have proximityd (promity daemon) running which is polling the hardware. This causes extra wakeups for the kernel and stops the CPU sleeping so much.

Mentalist Traceur 2011-04-04 15:55

Re: PocketLock (N9oo)
 
Quote:

Originally Posted by damnshock (Post 981724)
I thought the proximity sensor was always on whether we use it or not. Ain't it suppose to send a dbus signal (or something alike) when it's switched on?

Regards

It's "on" in that the hardware is technically supplied power. But the rest of the hardware, where the OS itself is being executed, has to send a signal to the proximity sensor hardware "are you covered", to which the proximity sensor sends back yes/no. The proximity sensor is NOT in possession of its own processor, or capable of fancy computations - DBus is a complicated thing, and happens inside the operating system. In order for that dbus signal to happen, the N900's OS first has to get the response of either covered or un-covered from the sensor hardware. It's like when your computer interfaces with it's CD drive - the CD drive doesn't read the disk and tell the rest of the computer "there's files X, Y, and Z, of sizes A, B, and C respective, containing the following contents, on this disk" - the CD drive just receives the commands that tell it to spin up the disk and what coordinates on it to read, and then sends back a stream of ones/zeroes back to the operating system.

Same thing, except the proximity sensor is a lot "simpler", and only has one one or one zero that it sends, per every "polling". Now, every time the OS has to poll the proximity sensor, it has to send a little burst of electricity to the proximity sensor, and while that's not that bad for energy consumption if done only when you're in a phone call or whatever, it IS pretty bad if it's doing it hundreds of times every minute, all the time.

Alfred 2011-04-04 16:24

Re: PocketLock (N9oo)
 
1 Attachment(s)
There is lockd.py in the net. I mean it's been a while since i got it from somewhere. It is a simple python that locks ur screen when you shut the proximity sensor and unlocks ur screen when you shake the phone. You can set time, for how long should the sensor be shut in order to lock the scree.
P.s. don't forget to change format to .py

tHMZ 2011-04-04 16:53

Re: PocketLock (N9oo)
 
How about you double-click the power-button through your pants?

F2thaK 2011-04-04 23:39

Re: PocketLock (N9oo)
 
its so you can quickly throw it in your pocket

F2thaK 2011-04-05 05:23

Re: PocketLock (N9oo)
 
Quote:

Originally Posted by Alfred (Post 981767)
There is lockd.py in the net. I mean it's been a while since i got it from somewhere. It is a simple python that locks ur screen when you shut the proximity sensor and unlocks ur screen when you shake the phone. You can set time, for how long should the sensor be shut in order to lock the scree.
P.s. don't forget to change format to .py

can someone pls help me make this run at boot if possible?

thanks

Gill T 2011-04-14 12:38

Re: PocketLock (N9oo)
 
Quote:

Originally Posted by Alfred (Post 981767)
There is lockd.py in the net. I mean it's been a while since i got it from somewhere. It is a simple python that locks ur screen when you shut the proximity sensor and unlocks ur screen when you shake the phone. You can set time, for how long should the sensor be shut in order to lock the scree.
P.s. don't forget to change format to .py

How to install ? a little guide please

couldvbb 2011-04-14 14:47

Re: PocketLock (N9oo)
 
Similar functions with Mykeylock
http://www.youtube.com/watch?v=jdFd8vg5Vjw


All times are GMT. The time now is 18:10.

vBulletin® Version 3.8.8