BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 05-09-2010, 10:00 AM   #1 (permalink)
New Member
 
Join Date: May 2010
Model: 9000
PIN: N/A
Carrier: Orange
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Exception throw on Connector.open(url)

Please Login to Remove!

Problem with opening an HTTP connection from BlackBerry application

When trying to open an HTTP connection from a BlackBerry application (Connector.open(url)) I get an exception.

I tried the following but it did not help:
- Do it from a WiFi connection (using the "interface=wifi" flag)
- Define the APN key
- Add to URL "deviceside=true;ConnectionTimeout=600000"

I am using BlackBerry Bold 9000

Please advise
Offline  
Old 05-09-2010, 10:13 AM   #2 (permalink)
Latino Hasta La Muerte
 
Join Date: Jan 2005
Location: Denville, NJ.
Model: 7250
OS: 4.1
PIN: G!!!
Carrier: Verizon
Posts: 9,035
Post Thanks: 51
Thanked 304 Times in 292 Posts
Default

Developer Section.
Offline  
Old 05-09-2010, 11:44 AM   #3 (permalink)
Appleinator
 
Dubdub's Avatar
 
Join Date: Nov 2005
Location: New Hampshire
Model: App5
OS: AJBR549
PIN: Ask
Carrier: ATT & Verizon
Posts: 20,030
Post Thanks: 54
Thanked 782 Times in 742 Posts
Default

Moved. Seems to be the best section.

And please do not double post. Exception thrown when calling Connector.open(url)

Second thread deleted with no responses.
__________________
-->>BB FAQ

-->>Stinsonddog's Tip Site!

-->>Twitter


If someone helps, tell them by clicking the Thanks button.!!
Offline  
Old 05-09-2010, 11:56 AM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

What exception did you get?

Is this a device, or simulator?

What APN info did you set? Are you aware that APN info is carrier/network specific?

What device, what OS Level, what carrier?
Offline  
Old 05-10-2010, 11:21 AM   #5 (permalink)
New Member
 
Join Date: May 2010
Model: 9000
PIN: N/A
Carrier: Orange
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

There are 4 types of exception you can get from the call:
- IllegalArgumentException
- ConnectionNotFoundException
- ControlledAccessException
- IOException

I got IOException

I also tried WiFi, and the folowing code:
public static String getConnectionString()
{
net.rim.device.api.servicebook.ServiceRecord [] ipppArray = net.rim.device.api.servicebook.ServiceBook.getSB() .findRecordsByCid("IPPP");
if(ipppArray == null)
return ";deviceside=true;ConnectionTimeout=600000";

int nOfRecords = ipppArray .length;
for(int i=0 ; i<nOfRecords ; i++)
{
net.rim.device.api.servicebook.ServiceRecord ipppRec = ipppArray[i];
if(ipppRec.isValid())
{
if(ipppRec .getName().equals("IPPP for BIBS"))
return ";deviceside=false;ConnectionUID="+ipppRec .getUid()+";ConnectionTimeout=600000";
}
}
return "ConnectionUID=uinternet;deviceside=true;Connectio nTimeout=600000";
}


Effectivly what happens is that
"ConnectionUID=uinternet;deviceside=true;Connectio nTimeout=600000";
Is always being added...

"uinternet" is the APN defined in my device by Orange Israel.

The device is BlackBerry 9000, version 4.6
Offline  
Old 05-10-2010, 02:13 PM   #6 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

PLease see this article re: specifying APN:

Livelink - Redirection
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.