I am getting the inputstream using the connection class in blackberry like this
HttpConnection httpConnection = new HttpConnection("http://www.bankofcanada.ca/rss/fx/noon/fx-noon-all.xml");
InputStream is = httpConnection.StreamConnection();
it works well in simulator, but the input stream returns null when run at device. Can please tell the solution for this problem. Thanks in advance.
You need to see this thread:
problem in StreamConnection blackberry
First, HttpConnection is an interface, not a class, so I don't see how your code could even compile. Then, you don't have any connection parameters on your url, so you are at the mercy of whatever network the device is on. You also need to check the return code after making a connection to check that it succeeded. Only then can you try to open an input stream.
You might want to take a look at the sample networking code by Peter Strange.
On real device you need to append appropriate URL parameter according to connection type(WiFi/BES/BIS/WAP2/TCP) you are using.