Active Topics

 


Reply
Thread Tools
Posts: 124 | Thanked: 213 times | Joined on Dec 2009
#1
How can I hook into the same event that the Camera app uses - when you slide the shutter open it launches the app. I would like to open a popup window when the shutter is opened, and close it when the shutter is subsequently closed.

I could poll the same file the Healthcheck app uses (/sys/devices/platform/gpio-switch/cam_shutter/state), but this is not really satisfactory for my purposes.

I would also like to temporarily disable the Camera app from launching while my app is running...

...is there any DBus hackery I can use?
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#2
Originally Posted by Dak View Post
How can I hook into the same event that the Camera app uses - when you slide the shutter open it launches the app. I would like to open a popup window when the shutter is opened, and close it when the shutter is subsequently closed.

I could poll the same file the Healthcheck app uses (/sys/devices/platform/gpio-switch/cam_shutter/state), but this is not really satisfactory for my purposes.

I would also like to temporarily disable the Camera app from launching while my app is running...

...is there any DBus hackery I can use?
i'd suggest either looking at the code of the lens shutter app or asking the coder
Seems like he's almost done what you need in a way
http://maemo.org/packages/view/lens-cover-reminder-sp/
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 

The Following User Says Thank You to noobmonkey For This Useful Post:
Posts: 58 | Thanked: 10 times | Joined on Dec 2009
#3
You can disable the camera app with:
dsmetool -k /usr/bin/camera-ui

And turn it back on with:
dsmetool -t /usr/bin/camera-ui

This doesn't actually disable it. It disables starting the camera app on lens open event. You can call the camera app manually through DBUS if you want.

If you are working with Qt you can override your form close event, to turn camera app back on, when you are done with your app. Don't know about GTK, but it should be pretty similar.

Last edited by zolakt; 2010-06-03 at 09:41.
 

The Following 2 Users Say Thank You to zolakt For This Useful Post:
Posts: 388 | Thanked: 842 times | Joined on Sep 2009 @ Finland
#4
The lens cover event is available through HAL, see the sources of shortcutd.
 

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


 
Forum Jump


All times are GMT. The time now is 08:43.