Android关闭自定义相机快门声
AudioManager audioManager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
audioManager.setStreamMute(AudioManager.STREAM_SYSTEM, true);
// 消除拍照声音
final Handler soundHandler = new Handler();
Timer t = new Timer();
t.schedule(new TimerTask() {
@Override
public void run() {
soundHandler.post(new Runnable() {
@Override
public void run() {
AudioManager audioManager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
audioManager.setStreamMute(AudioManager.STREAM_SYSTEM, false);
}
});
}
}, 1000);
关注公众号:Python爬虫数据分析挖掘,学习更多python知识
耐得住寂寞,才能登得顶
Gitee码云:https://gitee.com/lyc96/projects