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
amol1709
Posts: 17
Registered: ‎11-19-2009
My Device: Not Specified

How to use USBPortListener ?

Hi ,

 

 

I want capture the USB connection event .I have implemented the  USBPortListener interface .

But its not working . plz tell me how to use  USBPortListener?

Developer
simon_hain
Posts: 16,350
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How to use USBPortListener ?

did you add the listener to your app? i think http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/system/Application.html#addIOP... should do it.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
amol1709
Posts: 17
Registered: ‎11-19-2009
My Device: Not Specified

Re: How to use USBPortListener ?

Hi simon_hain,

 

 

I am using JDE 4.5 and I have added UiApplication.getUiApplication().addIOPortListener(this);

in my constructor .