Sunday, September 2, 2012

[android-developers] Annoying shutter click undermines scientific research.


I am involved in a project to use camera enabled Android devices to detect cosmic ray events ( http://www.distributedsensorweb.org/wiki/index.php/DECO).  It is enjoying some modest funding from the American Physics Society and interest from Fermi Labs and Standford Univ.

The intent of the app is to run while the phone is plugged in and charging, like while the user is sleeping.  As such the shutter sound must be defeated.  In fact, even if you were running it on your desk while working the shutter sound is so annoying as to inspire you to reach for a hammer.

For most phones we have been able to make use of the mechanisms seen in previous posts:  mute streams and/or set volume to 0.  However, for a recent phone, the LG Optimus Elite (were using low cost Virgin Mobile devices as some of the test devices to reduce costs), none of the old tricks work:  the shutter sound always plays.  BUT!!!  I can download a camera app from the Google Play -- aptly named SilentCamera -- which will take pictures, well, silently.  And whatever solution it is employing is not using the MODIFY_AUDIO_SETTINGS permission.

I have already burned several hours researching and trying a variety of things.  As I've indicated I have tried muting and setting volume to 0 for all streams, just before the camera.takePicture() call.  And have tried to do the same in onShutter().  What I have learned is (according to the logs) that the camera is playing the shutter sound BEFORE the onShutter() call.

Obviously, I am hoping someone on the list can help.

Thanks.

/J

Note:  The LG Optimus Elite is running 2.3.7

No comments:

Post a Comment