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

Posts: 1
Registered: ‎04-08-2011
My Device: Bold 9650
My Carrier: Sprint

Network connections stops working



We recently added support for the WLANConnectionListener API to our application.  During testing we occasionally noticed that all network communication within our app seemed to stop working.  I spent some time trying to track this down and I can consistently reproduce this same behavior using two different RIM sample applications.  I'm using the 9700 simulator in the 5.0 JDE.

Simulator setup:

  • Make sure you have the "Launch Mobile Data System Connection Service (MDS-CS) with simulator" flag enabled.
  • Make sure you have both mobile network transport coverage and WiFi transport coverage when the simulator is started (using the Simulate / Network Properties… menu item within the simulator).
  • Make sure you configure a WiFi profile to connect to the simulated WiFi network (using Manager Connections / Set Up Wi-Fi Network).

After configuring the simulator, shut it down and follow these steps:

  1. Open the sample applications workspace.
  2. Launch the simulator.
  3. After the simulator starts up, open the "Manage Connections" application.
  4. Mobile Network and Wi-Fi should be enabled and connected.  Turn off the WiFi connection.  Close the "Manage Connection" dialog.
  5. Launch the "HTTP Demo" application.
  6. Complete the URL field with a valid URL (e.g., I use www.google.com).
  7. Hit the menu key and select the Fetch option.
  8. The application just displays "Working ....".
  9. After about two minutes, I get a popup with an InterruptedIOException indicating the connection timed out.
  10. Hit OK to close the exception popup.  
  11. Hit the End key to go back to the Home screen (leave the app running).
  12. Go back into the "Manager Connections" application.
  13. Turn on the Wi-Fi connection.
  14. Go back into the "HTTP Demo" application.
  15. Hit the menu key and select the Fetch option.
  16. This time it works as expected.


The HTTP Demo application uses Connector.open() directly (rather than the new Network APIs added in OS 5.0).  However, I am also able to reproduce this same behavior use the Network API Demo application (which does use the new Network APIs).


Have any of you seen this behavior before?  Is this a bug in RIM's network APIs?  Am I doing something wrong or am I misunderstanding how the network transports work?