Intercept camera slider open event to default camera app? (N900)

Intercept camera slider open event to default camera app? (N900)

Tom Waelti
Karma: 823
2009-12-14 22:32 UTC
Can anybody tell how an app can intercept the camera slider opening event, so that it does NOT call the default camera app?

This might be handy for my upcoming version of moodlight, which now has a camera-LED-based flashlight mode thanks to the input from RISKÓ Gergely.
It might also benefit all other cam-related apps such as mBarcode from Lardman.

Thanks and happy hacking :-)
-Tom

  •  Reply

Re: Intercept camera slider open event to default camera app? (N900)

Andres Gomez
Karma: 96
2009-12-17 01:12 UTC
On Mon, 2009-12-14 at 23:32 +0100, Thomas Waelti wrote:
> Can anybody tell how an app can intercept the camera slider opening
> event, so that it does NOT call the default camera app?
...

Sadly, currently the only way to stop the default camera app for getting
such events would be to actually stop the camera app as I think it gets
the lens cover status from HAL (and I suppose you will not stop the HAL
service for that ;) ).

The easiest way right now would be to run the command (as root, I
suppose):
$ dsmetool -k /usr/bin/camera-ui

Once you are done, you can start the camera app again with:
$ dsmetool -t /usr/bin/camera-ui

I hope this helps.

Br.
--
Andrés Gómez García
Computer Science Engineer
Telf: +34 981 91 39 91
Fax: +34 981 91 39 49
mailto:agomez@igalia.com
http://people.igalia.com/agomez
IGALIA, S.L. http://www.igalia.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAksphZcACgkQwp6Z3malp6Wc4gCeL9R+OEa2YuG4mejSn8mH7yYc
geQAn10YcQhXCGgATQnQ6ML68lye1EYe
=Khva
-----END PGP SIGNATURE-----

  •  Reply