Search code examples
mobilejava-mecameramidp

How to Silent Camera Click While Take Photo Using Java ME Code


I am developing a Java ME Application. My Application take photos at a regular Interval. My Application is working fine. Here Whenever My Application click the photo, It creates The Camera "click" Sound.

How Can I Make This Sound Silent ?


Solution

  • Here is a good trick, how to disable a sound of a shutter, with playing of a tone. You have to set a short sleep time, for initializing tone playing. So here is my code:

    try 
    {
    Manager.playTone(1, 100, 1);
    Thread.sleep(30);
    data = videoControl.getSnapshot("encoding=jpeg&width=600&height=800");
    } 
    catch (MediaException e) {}
    catch (InterruptedException e) {}