10-12-2012 01:37 AM - edited 10-12-2012 01:38 AM
My application using os 5 runs fine on wifi but it takes too much time to load when i run it on Blackberry edge network. How should i solve this problme?
Here is my code to connect to the server:
public static InputStream getInputStream(String url)
InputStream _is = null;
HttpConnection httpConnection = null;
ConnectionFactory factory = null;
ConnectionDescriptor descriptor = null;
factory = new ConnectionFactory();
descriptor = factory.getConnection(url);
if (descriptor != null)
httpConnection = (HttpConnection) descriptor.getConnection();
httpConnection = (HttpConnection) Connector.open(url);
final int iResponseCode = httpConnection.getResponseCode();
if(iResponseCode == HttpConnection.HTTP_OK)
_is = httpConnection.openInputStream();
catch (Exception e)
Solved! Go to Solution.
10-12-2012 03:59 AM
10-12-2012 04:06 AM - edited 10-12-2012 04:31 AM
Yes it is in separate thread. I am using DOM parser to get the data. On EDGE, data is fluctuating. Sometimes i am gettng the data..sometimes not. What can be the reasons behind it? Is there any different condtion to be handled for slow network?
10-12-2012 12:44 PM
What behaviour do you see when you don't get the data? Is some exception thrown?
10-13-2012 01:17 AM
10-16-2012 07:42 AM - edited 10-16-2012 09:15 AM
Actually its not running fine. Its running more fast. Still have a problem. App runs on wi-fi fine. But between screen navigations i am facing network issue. My first screen consists of list with images and text while second one has lot of labels,couple of ObjectChoicefields.
1.I click on row of list of 1st screen n navigate to second screen.
2.I press back and press refresh button(its in my app to refresh current screen).
3.After getting data(not everytime) i navigate to 2nd screen..this time connection is lost.
10-17-2012 03:00 AM