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
logos01
Posts: 1
Registered: ‎06-30-2009
My Device: Not Specified

Push Registry activation by Bluetooth

We're a company that developed a java application for E-Healt.

 

The E-Healt device have to start the appication by connecting to the mobile phone by bluetooth and sending data to it.

 

Our application runs fine on all the java-supporting mobile phones except blackberry, here is the code snippet that creates the issue:

 

....

            connections = PushRegistry.listConnections(false);

            if (connections.length == 0) {
                try {
                    PushRegistry.registerConnection(BluetoothServiceURL,
                            Mcn,
                            filter);
                    PushRegistry.registerConnection(SMSServiceURL,
                            Mcn,
                            filter);
                } catch (Exception ex) {
                   bsi.HandleError(ex.getMessage() + ex.toString());
                }
            }

 

 ....

 

When i run the application i get this Exception:

 

btspp://localhost:1101,name=Myapp does not support pushjavax.microedition.io.ConnectionNotFoundException:btspp://.....

 

This is quite strange since you claim to support jsr82 v1.1 and MIDP 2.0

 

We tested the application on a BlackBerry 8310 v4.5.0.44 (Platform 2.7.0.61)  cryptographic kernel v 3.8.5.32a

 

Bests

 

Logos01 Srl

Please use plain text.
Administrator
MSohm
Posts: 14,241
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Push Registry activation by Bluetooth

Regarding compliance with the relevant JSR specifications, support for PushRegistry launch capability is not mandatory over any particular connection type. So a connection type may be supported in general but it is not necessarily the case that this means it is supported for use with the PushRegistry. This is defined in JSR118 MIDP2 where it says:

"Connection vs Push Registration Support
Not all generic connections will be appropriate for use as push application transport. Even if a protocol is supported on the device as an inbound connection type, it is not required to be enabled as a valid push mechanism. e.g. a platform might support server socket connections in a MIDlet, but might not support inbound socket connections for push launch capability. A ConnectionNotFoundException is thrown from the registerConnection and from the registerAlarm methods, when the platform does not support that optional capability."

So it seems you are experiencing a ConnectionNotFoundException as a consequence of this.

 

Note that this issue is being investigated as a feature request in the Issue Tracker.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.