Notices


Reply
Thread Tools
Posts: 4 | Thanked: 2 times | Joined on Jan 2010 @ Germany
#1
Hey Guys.

After playing a few days with my new N900 (i somehow love this little machine ), i have a question about the camera application.

When I open the lens cover, the camera app automatically starts.
Since I am using the Flashlight-App quite often, is there a way to disable this autostarting?

This would be very useful, so that I don't have to close the camera app first everytime i want to use the Flashlight-App.

Every suggestion is welcome.

Bye,

DaTraS
 

The Following User Says Thank You to DaTraS For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#2
 

The Following 5 Users Say Thank You to qwerty12 For This Useful Post:
Posts: 147 | Thanked: 32 times | Joined on Sep 2009
#3
does it really work ?
 

The Following User Says Thank You to tangs For This Useful Post:
Posts: 4 | Thanked: 2 times | Joined on Jan 2010 @ Germany
#4
It works.
But after I run the first command, Flashlight won't work.

"Unable to turn on flashlight"

Don't know if it is caused by this command or because of an app I installed previously, but even after I typed in the second command, and thus turning on the autostarting again, flashlight is not able to turn on the flashlight.

I will try a reboot to see if it works.

/EDIT:

Okay, even a reboot wont work. Seems like my Flashlight is ****ed up. I've read through the thread and there seems to be a problem with the current version of flashlight.

So we can except this solution to be working.
Now, an app which would simply send these 2 commands by clicking "autostart on/off" would be great.

But I've been to long out of developing, so if someone could make an app out of this, this surely would be great!

Last edited by DaTraS; 2010-01-09 at 14:06.
 

The Following User Says Thank You to DaTraS For This Useful Post:
Posts: 219 | Thanked: 40 times | Joined on Sep 2010
#5
How about disable Camera button long press from launching the camera software IF the lens is covered? I remembered reading that the authors of shortcutd said it was plausible but involved an ugly hack. I don't care how ugly that is, if someone knows how to do it that would be great, cause it would work perfectly with shortcutd.
 

The Following User Says Thank You to zerocool2k For This Useful Post:
Posts: 1,994 | Thanked: 3,342 times | Joined on Jun 2010 @ N900: Battery low. N950: torx 4 re-used once and fine; SIM port torn apart
#6
 

The Following User Says Thank You to Wikiwide For This Useful Post:
Copernicus's Avatar
Posts: 1,986 | Thanked: 7,698 times | Joined on Dec 2010 @ Dayton, Ohio
#7
Let me drag up this thread to bring up this question once again -- is killing the camera app by using "dsmetool" still the best way to stop it from coming up every time you open the lens cover?

I tried to avoid this question back when I was working on the Lanterne app, but I've got an app now that just can't ignore the problem -- if both it and the camera app run at the same time, they'll fight each other for control over the camera's focus. So, I've gotta do something about it.

I know that mbarcode uses the "dsmetool" mechanism, and that seems to work on my N900s. But I'd like to know if it still works in all variations of the CSSU, and with the camera-ui2 project. Any hints as to a general-purpose mechanism to stop the camera app from coming up would be greatly appreciated. Thanks!
 

The Following 5 Users Say Thank You to Copernicus For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#8
@Copernicus,

The camera-ui is started (by Xsession) using "dsmetool -t /usr/bin/camera-ui".
"t" means "start-restart", i.e. on process exit it will be restarted up to N times.

So in principle killing it (after testing if it's actually running) with "dsmetool -k" should work fine (as long as you then restart it using dsmetool if required).

As an idea, perhaps SIGSTOP (and then SIGCONT) might do the trick nicely. But it's just an untested idea.

[EDIT] forgot to add, this is using CSSU-thumb, but was the same with stock firmware.
 

The Following 4 Users Say Thank You to reinob For This Useful Post:
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#9
It's seems most are using the dsmetool -k. I don't believe another method has been found.
camera-ui2 should not need to use any killing method as it replaces the camera-ui, in that instance.
Question what happens if two camera applications are running at the moment? Does the camera-ui not switch to standby mode? Does it definitely fight over the controls?
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following 2 Users Say Thank You to sixwheeledbeast For This Useful Post:
Copernicus's Avatar
Posts: 1,986 | Thanked: 7,698 times | Joined on Dec 2010 @ Dayton, Ohio
#10
Originally Posted by sixwheeledbeast View Post
Question what happens if two camera applications are running at the moment? Does the camera-ui not switch to standby mode? Does it definitely fight over the controls?
From what I'm seeing, I can say that Bad Things Happen(tm). When I run my app, I try to initialize the focus to a particular distance; if I then open the camera app, I can often hear the focus snap back to a different level. Moreover, the camera app will die with an "Operation Failed" message. (Possibly this is because my own app is not going into "standby mode" when the camera app starts; I'll have to see if I can find a way to do this.)

In general, though, I'm not seeing a way to tell when someone else is using the camera, or any method of negotiating ownership over the camera hardware.
 

The Following 2 Users Say Thank You to Copernicus For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 14:38.