Here is the code that I am using mute within a broadcast receiver to
capture the button:
if(inCall==true){
                        mAudioManager =
(AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
                        if(mAudioManager.isMicrophoneMute()==true){
                                Log.v(LOG_TAG, "Unmuting Mic");
                                Toast.makeText(context, "Mic Unmuted", 
Toast.LENGTH_LONG).show();

                                mAudioManager.setMicrophoneMute(false);


                        }
                        else{

                                Log.v(LOG_TAG, "Muting Mic");
                                mAudioManager.setMicrophoneMute(true);
                                Toast.makeText(context, "Mic Muted", 
Toast.LENGTH_LONG).show();

                        }

Let me know if you need any more code to understand what I am doing,
but the above code is muting the call, just not updating the mute
button in the phone app.

-Brian


On Feb 28, 11:24 pm, Jagruti Sangani <[email protected]>
wrote:
> please put the code then and then its posssible bcz if we make the mute the
> call then also change the state of call.
>
>
>
>
>
>
>
> On Tue, Feb 28, 2012 at 2:02 AM, brian lee <[email protected]> wrote:
> > I am trying to have a app mute the call when the camera button is
> > pressed.
>
> > I have that part of the code working, but I can not for the life of me
> > figure out if there is a way to change the state of the mute button in
> > the call so you know that it is currently muted. Anyone know how to do
> > that?
>
> > -Brian
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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

Reply via email to