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: 15
Registered: ‎10-04-2011
My Device: bold 9700
My Carrier: sktelecom

Can I know whether earphone is plugged in or not?

In Debugging Mode, "AR : Change AudioMode 32" message is shown when I plugged in my earphone to my phone.

 

But, I don't know how to know this information in my application.

 

Or, There are any event related to this kind of situation?

 

Sorry for my poor english.

 

Thanks and have a nice day Smiley Happy 

Highlighted
Developer
Posts: 246
Registered: ‎09-30-2010
My Device: Z10, Onyx2
My Carrier: IND XL

Re: Can I know whether earphone is plugged in or not?

use this
Audio.isHeadsetConnected()
this will detect weather the headset is connected or not
New Developer
Posts: 15
Registered: ‎10-04-2011
My Device: bold 9700
My Carrier: sktelecom

Re: Can I know whether earphone is plugged in or not?

Thanks, That helps me a lot!

 

But, there is any event or something? 

 

So the moment of plugging launches my app or calls functions.