Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7687029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:36:38+00:00 2026-05-31T19:36:38+00:00

I am having a problem connecting to the server hosting my webservice when I

  • 0

I am having a problem connecting to the server hosting my webservice when I deployed the app to the device. This instance occurs when I used the following connection parameter:

}else if(TransportTypes[i]== TransportInfo.TRANSPORT_TCP_CELLULAR ){
             String carrierUid = getCarrierBIBSUid();
                if(carrierUid == null) {
                    ConnectionParameter = ";deviceside=true";
                }
                else{
                    **ConnectionParameter = ";deviceside=false;connectionUID="+carrierUid + ";ConnectionType=mds-public**";
                }  

            break;
        }


public static String getCarrierBIBSUid(){

    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].getUid().toLowerCase().indexOf("wifi") == -1) &&
                    (records[i].getUid().toLowerCase().indexOf("mms") == -1))
                {
                        uid = records[i].getUid(); 
                        break;
                }
            } 
        }
    }
    return uid;

}

Everything worked fine on the simulator.

Everything also worked fine on both the device and the simulator when using WiFi:

if(TransportTypes[i]== TransportInfo.TRANSPORT_TCP_WIFI ){
            ConnectionParameter = ";interface=wifi";
            break;
        }

or just:

ConnectionParameter = ";interface=wifi";

Any one have a clue what might be the problem with this approach?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:36:39+00:00Added an answer on May 31, 2026 at 7:36 pm

    Well, I have found a way around the problem. Though the APN setting is still needed to use TCP direct channel. I checked consecutively for the strongest available channel before using one.

    below is the excerpt of my code:

    public static String getConnParams() {
        String ConnectionParameter ="" ;
        int TransportTypes[] = TransportInfo.getAvailableTransportTypes();
        int wifi=0;
        int wap2=0;
        int BIS=0;
        int MDS=0;
        for(int i=0; i<TransportTypes.length; i++){
            if(TransportTypes[i]== TransportInfo.TRANSPORT_TCP_WIFI ){
            wifi  = TransportInfo.TRANSPORT_TCP_WIFI ;
            }else if(TransportTypes[i]== TransportInfo.TRANSPORT_WAP2 ){
            wap2 =  TransportInfo.TRANSPORT_WAP2; 
            }else if(TransportTypes[i]== TransportInfo.TRANSPORT_BIS_B  ){
                BIS = TransportInfo.TRANSPORT_BIS_B;
            }else if(TransportTypes[i]== TransportInfo.TRANSPORT_MDS ){
                MDS = TransportInfo.TRANSPORT_MDS;
            }
        }
    
        if(wifi!=0 && TransportInfo.hasSufficientCoverage(wifi)){
            ConnectionParameter = ";interface=wifi";
            return ConnectionParameter;
        }else if(wap2 !=0 &&TransportInfo.hasSufficientCoverage(wap2)){
             String carrierUid = getCarrierBIBSUid();
            if(carrierUid == null) {
                ConnectionParameter = ";deviceside=true";
            }
            else{
                ConnectionParameter = ";deviceside=true;connectionUID="+carrierUid;
            } 
            return ConnectionParameter;
        }else if(BIS !=0 && TransportInfo.hasSufficientCoverage(BIS)){
            ConnectionParameter = ";deviceside=false";
            return ConnectionParameter;
        }else if(MDS !=0 && TransportInfo.hasSufficientCoverage(MDS)){
            ConnectionParameter = ";deviceside=false";
            return ConnectionParameter;
        }else{
            ConnectionParameter = ";deviceside=true";       
            return ConnectionParameter;
        }
    
    
    }
    

    As well you will really find the following link helpful:
    Creating a BlackBerry HTTP Connection – Tutorial

    Thank you all for your suggestions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been having numerous connection problems between my Java (JPA+Hibernate+CommonsDBCP) app connecting to MySQL.
I'm having problems when connecting to a legacy database in SQL Server. The problem
I'm having a problem connecting to a MySQL server over two different trusted domains.
I am having problems with SQL Server dropping a connection after I have dropped
Having a problem with NSURLConnection, if I create a NSURLConnection and call [connection connectionWithRequest]
[Updated below] I am having a problem connecting to a MySQL database using a
So, i've been having this problem for a while now. Notepad++ NppFTP plugin fails
Well, having a small problem. A 3rd party is connecting to our API, however
The app I'm writing is connecting to a XMPP server, and if the user
I'm having trouble understanding the top level of abstraction of this problem. The Problem:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.