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
New Developer
Posts: 19
Registered: ‎07-22-2008
My Device: Not Specified
Accepted Solution

Mute KeyPress and GlobalEventListener

Hello:

 

Is it possible to detect the mute keypress using GlobalEventListener?


Anybody know where can I get details of the global events?

Thanks
Highlighted
Developer
Posts: 41
Registered: ‎08-05-2008
My Device: Not Specified

Re: Mute KeyPress and GlobalEventListener

You receive a globalevent whenever a sound profile is changed, but what is the profile selected we cannot retrive.

I debiged on simulator & found that we receive object of Profile calss which is not accesible to normal java applications so we cannot use it.

Developer
Posts: 432
Registered: ‎02-23-2009
My Device: Not Specified

Re: Mute KeyPress and GlobalEventListener

In order to use GlobalEventListener, you can post a globalEvent from a application to any other other application. You can post this global event to all applications or to any specific application then that specific application will recieve global event and perform anything as required.

 

To achieve this you need to implement GlobalEventListener in recieving app with the use of these methods addGlobalEventListener() and eventOccurred().

 


If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish

 

Deepesh Gupta
New Developer
Posts: 19
Registered: ‎07-22-2008
My Device: Not Specified

Re: Mute KeyPress and GlobalEventListener

I have tested in simulator to capture globalevents and not is possible detect mute keypress and also +/- volume key. I not understand how this buttons can comunicate with system.

Thanks

Developer
Posts: 432
Registered: ‎02-23-2009
My Device: Not Specified

Re: Mute KeyPress and GlobalEventListener

To trace any key event you need to implement keyPadListener and then you can detect any particular key using keypad

 

 


If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish

 

Deepesh Gupta
New Developer
Posts: 19
Registered: ‎07-22-2008
My Device: Not Specified

Re: Mute KeyPress and GlobalEventListener

Thanks, but my app running in background and not support keyListener also keypadlistener.
Developer
Posts: 432
Registered: ‎02-23-2009
My Device: Not Specified

Re: Mute KeyPress and GlobalEventListener

Sorry to say but if your app is always running background app (i.e. your app extends Application not uiApplication) then you can't trace key events.

 

 


If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish

 

 

Deepesh Gupta
New Developer
Posts: 8
Registered: ‎09-29-2009
My Device: Not Specified

Re: Mute KeyPress and GlobalEventListener

It is possible to take control over mute key event when the app is running in background and without using jde 5.0.

I do not know how, but there is a blackberry app media player named "Mobiola xPlayer" that works over several blackberry devices, pearl, storm, etc, (so the S.O is not 5.0), and the mute key works perfectly when the app is in background.

How is it done? I do not know, but I would like to know if is possible.

 

Thanks.

Developer
Posts: 511
Registered: ‎05-31-2009
My Device: Not Specified

Re: Mute KeyPress and GlobalEventListener

Hey. So is it possible to handle key presses for all apps and act on them? Just confirming, globaleventlistener is not for such events and the keylistener looks like one-app...

 

Tks

J