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

Adobe AIR Development

Reply
Developer
Posts: 63
Registered: ‎12-10-2012
My Device: Blackberry 9900
My Carrier: Vodafone-in
Accepted Solution

headset notification in bb10

[ Edited ]

Hi I was wondering if there is any support for headset notifications.. I mean do we get any notification when we plug in our headset and also when we remove the headset... or any event is being triggered .. If there is some event being triggered at the time then can we programatically acces it.....

 

``````````````````````````````````````````EDIT`````````````````````````````````````````

 

While going throught API Reference for Adobe Air I found some code and tried it 

My code 

 

addEventListener(qnx.events.AudioManagerEvent.CONNECTED_INPUT_CHANGED, outputchanged);
addEventListener(qnx.events.AudioManagerEvent.CONNECTED_OUTPUT_CHANGED, outputchanged);

private function outputchanged(event:qnx.events.AudioManagerEvent):void
{
trace('Output is '+event);
}

 

this is not working. I didnt get any trace output...?? Any idea..??

 

 

 

 

Any advise/help is appreciated

Thanks in advance

_______________________________________________________
Help is available everywhere but you have to look at the correct place.
By Me :-)
Developer
Posts: 63
Registered: ‎12-10-2012
My Device: Blackberry 9900
My Carrier: Vodafone-in

Re: headset notification in bb10

Solved it Changed the code to

var audioManager:AudioManager = AudioManager.audioManager;
audioManager.addEventListener(AudioManagerEvent.CONNECTED_OUTPUT_CHANGED, outputchanged);
_______________________________________________________
Help is available everywhere but you have to look at the correct place.
By Me :-)