Are you running the loop on the UI thread? Calling sleep() on the UI
thread is bound to cause you problems.
Apart from that remember it may take some time for hardware to become
active or inactive.

On Jul 21, 7:37 pm, ranjan ar <ranjan....@gmail.com> wrote:
> Hello, I am trying to toggle the microphone of Android mobile. App. freezes
> if I run the mute and unmute in a loop, With a delay of say 500ms. Is there
> a specific reason mobile behaves this way? (Motorola Droid is not even able
> to mute the phone) however all other mobiles are able to do it.
>
> This runs in a loop for 20 times
>
> audioService.setMicrophoneMute(true);
>
> try {
>
>     Thread.sleep(500, 40);
>
> } catch (InterruptedException e) {
>
>     // TODO Auto-generated catch block
>
>     e.printStackTrace();
>
> }
>
>  audioService.setMicrophoneMute(false);
>
> Thank you all .

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to