BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 06-17-2009, 11: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, 09: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, 10: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  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





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