Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 32
Registered: ‎05-24-2009
My Device: Not Specified

How can i mute The phone while my application running.


Hi,

I need to mute all sounds from phone when my application running (Or switch to silent profile).


I tried the following codes in my Application Class Constructor
--------------
Alert.mute(true);
Audio.setVolume(0);
Alert.setVolume(0);
Alert.stopVibrate();
Alert.stopAudio();
Alert.stopMIDI();
Alert.setBuzzerVolume(0);
Alert.stopBuzzer();
---------
Alert.setADPCMVolume(0);
Alert.stopADPCM();
------------


But this cannot mute my phone .

ie The phone make ring sound during an incoming call.

I aso tried the code during the "callIncoming" event of "PhoneListener"

But the result is same


Have any solution for this.
This is possible in Nokia Phone .


Is there any options in RIM API ?


New Developer
Posts: 94
Registered: ‎03-06-2009
My Device: Not Specified

Re: How can i mute The phone while my application running.

Putting an incoming call on silent is not possible ( i also tried a lot). Does not matter what you do, as soon as call comes BB will take over the control of the player and start ringing.
Highlighted
Developer
Posts: 32
Registered: ‎05-24-2009
My Device: Not Specified

Re: How can i mute The phone while my application running.

But some applications have this features .

 

and i can,t find about this in BB api

 

Can we do somthing with PhoneListener ?

like repeatedly stops the alert (Alert.stopAudio())?

Are youany idea like that?

 

or any other J2me api for that ?