maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [WIP] Closing Lens Cover to Lock Phone (https://talk.maemo.org/showthread.php?t=52990)

cfh11 2010-05-18 17:23

[WIP] Closing Lens Cover to Lock Phone
 
Ok.. so I really like the feature where you can open the lens cover to unlock the phone and launch the camera. However, it would be REALLY nice if you could do the reverse (lock the phone and close the camera app by closing the lens cover. I will often take my phone out just to snap a couple quick pics and this would be a lot more convenient.

I'm sure just a simple script would accomplish this, but I don't know enough to do it myself. :(

Spr33 2010-05-18 17:29

Re: Closing Lens Cover to Lock Phone?
 
The phone actually already somewhat has it built in. You can try it yourself:

Make sure phones locked. Open lens, take a picture, close the lens and the phone should lock back up.

Though I've noticed that if you touch the screen while the phone is unlocked, closing the lens cover only closes the camera app

kd_alex 2010-05-18 17:31

Re: Closing Lens Cover to Lock Phone?
 
Good idea! There is a lens cover open reminder app that was just released. Maybe talk to the guy who made this app and he can point you in the right direction. His user name is nicolai and the thread about the reminder is below.

http://talk.maemo.org/showthread.php?t=52534

cfh11 2010-05-18 17:50

Re: Closing Lens Cover to Lock Phone?
 
Quote:

Originally Posted by Spr33 (Post 664528)
The phone actually already somewhat has it built in. You can try it yourself:

Make sure phones locked. Open lens, take a picture, close the lens and the phone should lock back up.

Though I've noticed that if you touch the screen while the phone is unlocked, closing the lens cover only closes the camera app

Regardless of whether or not I touch the screen, closing the lens cover closes the camera app only. Either way, I frequently edit pics on the spot so it would be nice if the lens cover could lock the phone in both scenarios.

cfh11 2010-05-18 17:50

Re: Closing Lens Cover to Lock Phone?
 
Quote:

Originally Posted by kd_alex (Post 664530)
Good idea! There is a lens cover open reminder app that was just released. Maybe talk to the guy who made this app and he can point you in the right direction. His user name is nicolai and the thread about the reminder is below.

http://talk.maemo.org/showthread.php?t=52534

I thought about that but I didn't want to pollute that thread. Maybe I will PM him.

nicolai 2010-05-18 21:18

Re: Closing Lens Cover to Lock Phone?
 
Quote:

Originally Posted by cfh11 (Post 664558)
I thought about that but I didn't want to pollute that thread. Maybe I will PM him.

Thanks for the invitation.

Nice idea, but I wouldn't use this feature, though.
I think it would be annoying very soon.
But I'll take a look anyway and test this in my lenscover reminder app.

regards nicolai

cfh11 2010-05-18 21:35

Re: Closing Lens Cover to Lock Phone?
 
Quote:

Originally Posted by nicolai (Post 664883)
Thanks for the invitation.

Nice idea, but I wouldn't use this feature, though.
I think it would be annoying very soon.
But I'll take a look anyway and test this in my lenscover reminder app.

regards nicolai

Yeah, I don't think it really fits in your app. However, it would be a nice option to have (similar to the lens open option in Tweakr).

Even if I could accomplish this setting in command line I would be happy, but alas, I know nothing about coding.

nicolai 2010-05-18 21:48

Re: Closing Lens Cover to Lock Phone?
 
1 Attachment(s)
Quote:

Originally Posted by cfh11 (Post 664900)
Yeah, I don't think it really fits in your app. However, it would be a nice option to have (similar to the lens open option in Tweakr).

Even if I could accomplish this setting in command line I would be happy, but alas, I know nothing about coding.

I just added some code to lock the screen when the lens cover
is closed. This is not configurable, you have to uninstall the app
if you don't like it. I don't upload it to extras-devel, this is just for
you.

regards nicolai

F2thaK 2010-05-19 06:02

Re: Closing Lens Cover to Lock Phone?
 
Quote:

Originally Posted by Spr33 (Post 664528)
Though I've noticed that if you touch the screen while the phone is unlocked, closing the lens cover only closes the camera app

this happens for me

pelago 2010-05-19 13:20

Re: Closing Lens Cover to Lock Phone?
 
Quote:

Originally Posted by Spr33 (Post 664528)
The phone actually already somewhat has it built in. You can try it yourself:

Make sure phones locked. Open lens, take a picture, close the lens and the phone should lock back up.

This only works if no other apps are running. If other apps are running, when you close the lens cover, the phone goes to the task switcher screen rather than locking.

F2thaK 2010-05-19 13:30

Re: Closing Lens Cover to Lock Phone?
 
okay im gonna try the modified version of this app (above) thanks!

works well thanks

cfh11 2010-05-19 13:32

Re: Closing Lens Cover to Lock Phone?
 
Quote:

Originally Posted by nicolai (Post 664916)
I just added some code to lock the screen when the lens cover
is closed. This is not configurable, you have to uninstall the app
if you don't like it. I don't upload it to extras-devel, this is just for
you.

regards nicolai

Thanks you are awesome!

F2thaK 2010-05-19 13:46

Re: Closing Lens Cover to Lock Phone?
 
forgive me but if you add this function to your app it would be sweeeet:



- closing the lens while in camera app - locks phone
- closing lens after closing camera app (therefore, not running camera) - does not lock phone

- this happens no matter which way you run the camera



.

cfh11 2010-05-19 14:10

Re: Closing Lens Cover to Lock Phone?
 
Quote:

Originally Posted by f2thak (Post 666060)
forgive me but if you add this function to your app it would be sweeeet:



- closing the lens while in camera app - locks phone
- closing lens after closing camera app (therefore, not running camera) - does not lock phone

- this happens no matter which way you run the camera



.

Agreed. I think this would be even better than having it be a configurable option.

F2thaK 2010-05-19 14:11

Re: Closing Lens Cover to Lock Phone?
 
thats sorta what I was aiming for :D

F2thaK 2010-05-19 14:23

Re: Closing Lens Cover to Lock Phone?
 
actually can you also make it close the camera app when you close the lens to lock (while in camera)......... ??

thanks

Marc-Adrien Verre 2010-05-19 14:28

Re: Closing Lens Cover to Lock Phone?
 
This is something I've been thinking about! Works perfectly!

nicolai 2010-05-19 14:41

Re: Closing Lens Cover to Lock Phone?
 
@f2thak
closing the lens cover always close the camera app (or the camera ui).
No matter what I do in may app. I think this is handled by the camera app.

cfh11 2010-05-19 14:46

Re: Closing Lens Cover to Lock Phone?
 
Quote:

Originally Posted by nicolai (Post 666140)
@f2thak
closing the lens cover always close the camera app (or the camera ui).
No matter what I do in may app. I think this is handled by the camera app.

Closing the camera app by way of the lens cover is fine, what we were saying is that it would be cool if closing the lens cover only locks the phone IF the camera app is open.

F2thaK 2010-05-19 14:47

Re: Closing Lens Cover to Lock Phone?
 
oh, I see now, thanks :D

F2thaK 2010-05-19 14:48

Re: Closing Lens Cover to Lock Phone?
 
Quote:

Originally Posted by cfh11 (Post 666151)
Closing the camera app by way of the lens cover is fine, what we were saying is that it would be cool if closing the lens cover only locks the phone IF the camera app is open.

read post #13.......... :D

pelago 2010-05-19 15:34

Re: Closing Lens Cover to Lock Phone?
 
I don't know if this is possible, but ideally I think closing the lens cover should only lock the phone if (a) the camera app is open, and (b) the lens cover was used to unlock the phone in the first place.

In other words, if I already have the phone unlocked and am using it for other things, then decide I want to take a picture and so open the lens cover, if I then close the lens cover I would not want the phone to lock.

cfh11 2010-05-19 15:42

Re: Closing Lens Cover to Lock Phone?
 
Quote:

Originally Posted by pelago (Post 666217)
I don't know if this is possible, but ideally I think closing the lens cover should only lock the phone if (a) the camera app is open, and (b) the lens cover was used to unlock the phone in the first place.

In other words, if I already have the phone unlocked and am using it for other things, then decide I want to take a picture and so open the lens cover, if I then close the lens cover I would not want the phone to lock.

I agree, this would be the ideal implementation. However, just basing the lock control on whether or not the camera app is open could still work (you would just have to x out of the camera then close the lens). I am just thinking of the simplest implementation possible so hopefully nicolai will be kind enough to help us again :)


All times are GMT. The time now is 11:22.

vBulletin® Version 3.8.8