mixiyihao / spydroid-ipcamera

Automatically exported from code.google.com/p/spydroid-ipcamera
GNU General Public License v3.0
0 stars 0 forks source link

Beep sound!! #54

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Is there anyway to remove the beep sounds when you connect?
Its supposed to be a hidden cam, making a beep sound ruins the hidden part.

Original issue reported on code.google.com by amitaymo...@gmail.com on 27 Jun 2012 at 5:41

GoogleCodeExporter commented 8 years ago
Right :(
On ICS when you mute the phone, there is no beep but on GB i don't think there 
is a way to remove it

Original comment by FyHertz on 28 Jun 2012 at 12:07

GoogleCodeExporter commented 8 years ago
I've used the following to disable the beep sound when the camera starts

private void setMuteAll(boolean mute) {
        AudioManager manager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);

        int[] streams = new int[] { AudioManager.STREAM_ALARM, AudioManager.STREAM_DTMF, AudioManager.STREAM_MUSIC, AudioManager.STREAM_RING, AudioManager.STREAM_SYSTEM,
                AudioManager.STREAM_VOICE_CALL };

        for (int stream : streams)
            manager.setStreamMute(stream, mute);
    }

I call this in onResume and onPause

Original comment by richluca...@gmail.com on 12 Apr 2013 at 8:40