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  
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

Original OEM APPLE Airport Extreme Base Station Power Supply AC Adapter A1202
$8.99
Original OEM APPLE Airport Extreme Base Station Power Supply AC Adapter A1202 pictureField Controls Mg1 8" Barometric For Gas Appl OEM 1986501
$172.99
Field Controls Mg1 8(C21) Genuine OEM Apple AC Cord
$25.0
(C21) Genuine OEM Apple AC Cord pictureOriginal OEM APPLE Airport Extreme Base Station Power Supply AC Adapter A1202
$14.6
Original OEM APPLE Airport Extreme Base Station Power Supply AC Adapter A1202 pictureOEM Battery Screw Screws Set for Apple MacBook Air 13" A1466 A1465 A1369 A1370
$2.29
OEM Battery Screw Screws Set for Apple MacBook Air 13






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