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

Regular Contributor
Posts: 74
Registered: ‎01-12-2012
My Device: Developer
My Carrier: Developer

how to make application audio 'silent' when the mobile's 'profile' become 'silent' ???

Hello I made an application, that sometimes triggers a notification sound.
My problem is that when I put the MOBILE profile to SILENT, the application keeps on making the sounds, it does not goes silent like the mobile's profile.

so I was wondering how can I do that ?? ""make my application silent when the mobile's profile becomes silent""
Is it like I need to get a profile instance ? or put a listener to the profilechange ? I really have no idea.
Thanks in advance for all the help... all truely appreciated, Thank you.

This is the code I am using to play the audio:

p = null;

Class cl = null;
cl = Class.forName("com.my.class");
InputStream is = cl.getResourceAsStream("/" + Source);

p = javax.microedition.media.Manager.createPlayer(is,"audio/mp3");