Android(安卓)Camera ShutterSound customization
You can turn off your camera shutter sound according the steps if you can modify the code.If you have any good ideas ,please contact me.Thanks.
Platform version:4.0
Modify the CameraService.cpp via frameworks/base/services/camera/libcameraservice/ path.
You should find the function these:
1.mCameraService->playSound(SOUND_RECORDING)2.mCameraService->playSound(SOUND_SHUTTER)3.playRecordingSound()
If your SDMID is Shutter_sound_enable, which is from your customization configuration file,you can get the property value of Shutter_sound_enable,like this:
char value[PROPERTY_VALUE_MAX]; property_get("Shutter_sound_enable",value,"0"); if (strcmp(value,"true")==0){ //if the parameter have two values:true and false //enable the shutter sound }
You should replace all of the 3 functions in the CameraService.cpp.
Then compile the module ,you will get the libcamearaservice.so file,and then push into the phone.
Restart your phone.
You can use the command:
adb shell setprop Shutter_sound_enable false //set the property value
adb shell getprop Shutter_sound_enable //get the property value
I have done the work.
Good luck.
更多相关文章
- 代码中设置drawableleft
- android 3.0 隐藏 系统标题栏
- Android开发中activity切换动画的实现
- Android(安卓)学习 笔记_05. 文件下载
- Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
- 技术博客汇总
- android 2.3 wifi (一)
- AndRoid Notification的清空和修改
- Android中的Chronometer