BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 06-17-2009, 10:16 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jun 2009
Location: Belarus, Minsk
Model: none
PIN: N/A
Carrier: none
Posts: 17
Post Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Problem with Connector.Open

Please Login to Remove!

Hi to all. I'm a newbie in bb development. And i have no much experience using Java. I have a problem.

Code:
httpConnection = (HttpConnection)Connector.open(temp);
String temp contains the real link. But in debug window value of httpConnection._responceCode is 0 after execution of this command.
So the next line

Code:
in = httpConnection.openDataInputStream();
has no sense and gives me an error.

In another program it works correctly. Any ideas?
Offline  
Old 06-17-2009, 08:19 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

If you read the JavaDoc page for HttpConnection it has some extensive code examples on how to read a URL. You must perform this on a thread that is not the event thread however.
__________________
My other Blackberry is a PlayBook.
Offline  
Old 06-18-2009, 09:40 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Jun 2009
Location: Belarus, Minsk
Model: none
PIN: N/A
Carrier: none
Posts: 17
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.