08-17-2009 01:54 AM
I try to set Phone volume to 0 using RIM api
Alert.mute(true); Audio.setVolume(0); Alert.setVolume(0);
But after make an incomming call The master volum set to 100 automatically (i displayed the master volume and alert volume in my app then the alert shows 0 and master volume set to 100. Before the incomming call the both volume levels are zero ).
Then what is men by this function?
In API it is clarly specified that
setVolume public static boolean setVolume(int volume) Sets the desired master audio volume. Parameters: volume - Percentage of maximum volume. Returns: False if an error occurred. Since: JDE 4.0.2 Category: Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Then how can i set the master volume to ZERO or switch Silent profile .
Plese see my previous thread also(http://supportforums.blackberry.com/rim/board/mess
08-17-2009 10:48 AM
As I understand it, the mute() and setVolume() calls work as specified, but as soon as RIM's Phone application starts up it ignores your settings and uses its own, based on the current profile. So the API works as specified, it's just useless for alerts related to incoming phone calls and messages. Apparently you should only use the API to mute your own custom alerts.
There's no API to control the Phone application, though OS 5.0 will let you write on part of the screen.
08-17-2009 05:16 PM
08-18-2009 12:35 AM - edited 08-18-2009 12:36 AM
There is one solution for that ,
We can mute the phone by switch the profile.
Unfotunately there is no api for the same
But it is possible with the help of event injection.
Have you any idea about the key kode for switch between silent profile and loud profile (any other profile ie may be # - key code)