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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Contributor
Posts: 8
Registered: ‎09-20-2012
My Device: Z10 LE, PlayBook
My Carrier: Wind

Can BES IT policy disable connections for java apps?

I have a java app I distribute through App World that needs to make an https connection. Like many, I have struggled to automatically detect the proper network gateway and settings for making a connection on my clients devices. My latest code works pretty well across many devices, I use ConnectionFactory, on the first attempt it tries with a preferred transport order of mds, bis, wifi, carrier tcp, wap2. If that fails it falls back and reattempts a connection using a connection factory with just wifi and carrier tcp. In all cases my factories use requireendtoend=true, which seems to be required for some MDS and BIS connections.


While my above strategy seems to work pretty well, I've still found a client where it fails. For this client the ConnectionFactory always returns null for any transport method. I know the client is on the network because they can email me from their BlackBerry! The only way I can reproduce this type of behavior is to deny all connections in the application permissions, but that results in the device throwing up a permissions dialog whenever the app tries to make a connection, and my client doesn't see these errors.


I'm not a BES expert, so can anyone tell me whether a BES administrator can set a policy that would make a java app run this way? It's very odd since the user was obviously able to use App World and download my App, so clearly the device is connected to a network and some Apps are able to make network connections.

Posts: 17,026
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Can BES IT policy disable connections for java apps?

welcome to the support forums.

yes, it policies can block all network access.
maybe you can use the network diagnostics tool from the olden days:

if it can connect your code is at fault, if not, they have a different issue (like the mentioned it policy, or a proxy or...)
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 Contributor
Posts: 8
Registered: ‎09-20-2012
My Device: Z10 LE, PlayBook
My Carrier: Wind

Re: Can BES IT policy disable connections for java apps?

Thanks, I'll give that a try. I've basically tried using the ConnectionFactory with lots of different settings and it can't detect any sort of available connection, so maybe the old way might work. It's a newer device (9380) running OS 7.1, so it's really surprising it doesn't work. I've tested my code on more than 10 devices and they all worked fine.