Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 31
Registered: ‎08-30-2011
My Device: 9810
My Carrier: idea celluler
Accepted Solution

Blackberry network connection problem, Urgent help needed

Hi all,

 

I have develped a Blackberry application for OS 6 and OS 7, This app uses salesforce login and its rest api calls.

My application works fine here in india, but when i deliver it to client i got connection timeout error (in US). I have tried all possible connection string but still unable to resolve the issue at my end.

 

Can any one help me in this issue?

Its very urgent. I need to connect via WAP2 and  the code for my connection parameter string is :

"

String connectionString="";

String carrierUid = getCarrierBIBSUid();
String wap2 = getWAP2ServiceRecord();
if (carrierUid != null) {
// otherwise, use the Uid to construct a valid carrier BIBS
// request
Logger.logEventInfo("uid is: " + carrierUid);
connectionString = ";deviceside=false;connectionUID="
+ carrierUid + ";";
} else if (wap2 != null) {
connectionString = ";deviceside=true;connectionUID=" + wap2;
} else {
// Has carrier coverage, but not BIBS. So use the carrier's TCP
// network
Logger.logEventInfo("No Uid");
connectionString = ";deviceside=true";
}

return connectionString;

 

the function definations are : 

"

private static String getCarrierBIBSUid() {
ServiceRecord[] records = ServiceBook.getSB().getRecords();

for (int i = 0; i < records.length; i++) {
if (records[i].getCid().toLowerCase().equals("ippp")) {
if (records[i].getName().toLowerCase().indexOf("bibs") >= 0) {
return records[i].getUid();
}
}
}

return null;
}

private static String getWAP2ServiceRecord() {
ServiceBook sb = ServiceBook.getSB();
ServiceRecord[] records = sb.findRecordsByCid("WPTCP");
String uid = null;
for (int i = 0; i < records.length; i++) {
// Search through all service records to find the
// valid non-Wi-Fi and non-MMS
// WAP 2.0 Gateway Service Record.
if (records[i].isValid() && !records[i].isDisabled()) {
if (records[i].getUid() != null
&& records[i].getUid().length() != 0) {
if ((records[i].getCid().toLowerCase().indexOf("wptcp") != -1)
&& (records[i].getUid().toLowerCase()
.indexOf("wifi") == -1)
&& (records[i].getUid().toLowerCase()
.indexOf("mms") == -1)) {
uid = records[i].getUid();
break;
}
}
}
}
if (uid != null) {
// open a WAP 2 connection
return uid;
} else {
// Consider another transport or alternative action.
return null;
}

}

"

 

I am getting "Could not select proper transport descriptor for url : 

"https://login.salesforce.com/services/oauth2/token ..... "

 

any help is appreciated 

 

 

Thanks

Manish Kumar

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Blackberry network connection problem, Urgent help needed

And which connection string is your code actually using?

 

What device, OS level and carrier are you using to test and is your client using?

 

Have you tried it on other phones in the US, say using one of the test companies?

Contributor
Posts: 31
Registered: ‎08-30-2011
My Device: 9810
My Carrier: idea celluler

Re: Blackberry network connection problem, Urgent help needed

Hi all, 

 

I have solved the issue. 

 

My Connection parameter requires ';EndToEndDesired'  for the https request (although it works for me without this parameter). I have tested the app using deviceanywhere and after adding this parameter application run perfectly  .

 

 

connectionString = ";deviceside=true;connectionUID=" + wap2
+ ";EndToEndDesired";

 

 

Thanks for your comment peter 

 

I was actually using WAP2 mehod.

Client OS version is BB OS 7 (on Torch 2 9810)

 

 

Regards

Manish Kumar