If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
Developer
Shraddha
Posts: 34
Registered: ‎07-25-2008
My Device: Not Specified

Launching application on hardware event.

Is it possible to launch our application based on some hardware event like inserting a dongle in blackberry device or so?

For instance, if a bluetooth dongle or any other hardware attached to the blackberry phone, can we launch the java application  when such hardware is connected to the phone? 

 

Please let me know if i need to clarify the question. 

Please use plain text.
Developer
Posts: 432
Registered: ‎02-23-2009
My Device: Not Specified

Re: Launching application on hardware event.

Yes you can launch your app on some hardware events. please specify on which hardware event you need to launch your app.

 


Press the kudos button to thank the user who helped you.

If your problem was get solved then please mark the thread as "Accepted solution".

 

Deepesh Gupta
Please use plain text.
Developer
Shraddha
Posts: 34
Registered: ‎07-25-2008
My Device: Not Specified

Re: Launching application on hardware event.

Well.. there's this device still in production..

so we are deciding which event should this manufacturer send from his device.. 

 

So in short, this is not any standard hardware event that i am looking for.. 

This device, after its designed and produced, would be attached to BB port.. will i be able to detect this and start my application on its insertion? 

Please use plain text.
Developer
Posts: 432
Registered: ‎02-23-2009
My Device: Not Specified

Re: Launching application on hardware event.

Is this device is your manufactured one or some other publicly availlable device ?

 


Press the kudos button to thank the user who helped you.

If your problem was get solved then please mark the thread as "Accepted solution".

 

Deepesh Gupta
Please use plain text.
Developer
Shraddha
Posts: 34
Registered: ‎07-25-2008
My Device: Not Specified

Re: Launching application on hardware event.

Our client is manufacturing it...
Please use plain text.
Developer
Posts: 432
Registered: ‎02-23-2009
My Device: Not Specified

Re: Launching application on hardware event.

You will connect that device to BB Handheld using Bluetooth or USB port or something else?

 

 


Press the kudos button to thank the user who helped you.

If your problem was get solved then please mark the thread as "Accepted solution".

 

 

 

Deepesh Gupta
Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Launching application on hardware event.

Deepesh, I think this poster is asking us which hardware event he should use.

 

As far as I know, the only hardware event that you can possibly signal on the BlackBerry is USB plug insertion.  To detect this I'm guessing you will have to have something running on the device with a USBPortListener.  This is something that you can test relatively quickly (assuming you code BlackBerry!).  I've no idea if it can be done and I am not aware of any device that does it.  But the point here is that to use this method, your application will actually be running on the device.  It will not be launched by the USB connection, however it could look that way to the user.

 

I think the BlackBerry is primarily designed around Bluetooth peripherals, so the normal method of adding some hardware functionality to the device (e.g. bar code scanner) is to attach it as a Bluetooth Device.  However the BlackBerry will not connect arbitrarily with a random Bluetooth device.  The user must be involved in this process, usually entering a PIN number at least.  Once paired, a program on the BlackBerry can be established to listen for Bluetooth events from the device, like a button push, and act accordingly.  Again this is NOT an application being launched, this is a a listener invoking some processing which looks like an application being launched.

 

Sorry, the short answer to your question, can you launch an application based on some hardware event is, I think, no.  Would you consider the 'listener' approach, either Bluetooth or USB?

Please use plain text.
Developer
Shraddha
Posts: 34
Registered: ‎07-25-2008
My Device: Not Specified

Re: Launching application on hardware event.

Hi..

Thanks for your responses. 

 

The device in consideration would connected using the USB port. 

USBPortListener looks good to me. I can have a background app that listens to USBportListener and would invoke the main application when the device is connected. 

 

Would consider this and keep you guys posted. 

 

Thanks again for your time. 

Please use plain text.