HttpConnection works on WiFi but not 3G

Hello

I have strange question. I have an application that connects to a remote server. Here's the use case:

Case user #1:

  1. Install the app
  2. Make sure the WiFi is enabled
  3. Start the application
  4. Press on submit-online works!

Case user #2:

  1. Install the app
  2. Make sure the 3G connection is activated
  3. Start the application
  4. Press on submit-online works!

Case user #3:

  1. Install the app
  2. Make sure the WiFi is enabled
  3. Start the application
  4. Submit-online works!
  5. Close the application
  6. Turn off the 3 G WiFi connection and Insure is WE
  7. Start the application => fails!

The application hangs on the Red statement below and then get a time-out error.

...

ConnectionFactory connFactory = new ConnectionFactory();

Conn = connFactory.getConnection (serverURL);

...

Does anyone have any idea why this might happen? I have found no reasonable explanation for it except to be a bug.

Finally, after long hours of debugging and testing. I discovered that the issue is network related and have nothing to do with the device. I ended up using the following connection string. I hope this helps anyone facing a similar issue and record long hours of debugging.

/**
* Gets the connection string needed for HTTP connections.
* @return the connection string.
*/
public static String getConnectionString() {}
    
read the type of coverage
Boolean isSimulator = DeviceInfo.isSimulator ();
Boolean isWifi = WLANInfo.getWLANState () is WLANInfo.WLAN_STATE_CONNECTED;
Boolean isMDS = CoverageInfo.isCoverageSufficient (CoverageInfo.COVERAGE_MDS);
Also Boolean = CoverageInfo.isCoverageSufficient (CoverageInfo.COVERAGE_BIS_B);
Boolean isDirect = CoverageInfo.isCoverageSufficient (CoverageInfo.COVERAGE_DIRECT);
Boolean noCoverage = CoverageInfo.getCoverageStatus () is CoverageInfo.COVERAGE_NONE;
    
get the connection string
Dim connectionString As String ="";
If {(isSimulator)
connectionString = '; deviceside = false;
} Else if (isWifi) {}
connectionString ="; interface = wifi. "
} ElseIf (also) {}
connectionString = '; deviceside = false; "REMOVED # #";
} Else if (isMDS) {}
connectionString = '; deviceside = false;
} ElseIf (isDirect) {}
String carrierUid = getCarrierBIBSUid ();
if(carrierUid == null) {}
connectionString = '; deviceside = true;
} else {}
connectionString = '; deviceside = false; ConnectionUID = "+ carrierUid +"; ConnectionType = mds_public; replace the underscore with -
}
} Else if (noCoverage) {}
connectionString = "";
} else {}
connectionString = '; deviceside = true;
}
    
Returns the connection string
return connectionString;
}

Thank you for your stone for assistance. You have given some useful tips.

Tags: BlackBerry Developers

Similar Questions

  • Satellite L40-15B - WiFi works at home but not at school

    My daughter has satellite worked at home and at school: wifi OK, internet OK. The satellite crashed: hard disk failure. Bought a new hard drive.

    I reset the Satellite via the recovery CD. It is now a new clean system with * Windows Vista home premium *. * Wifi works immediately at home. Internet too, but at school with my daughter, the wifi is NOT working anymore.*
    Laptops from other children at school always work with wifi.

    A college of my work told me his sister had exactly the same problem!

    Help!

    Hello

    If the WIFI connection works at home but not at school it has nothing to do with Toshiba. I think that your daughter should ask the administrator of the school what is the problem. Maybe the WLAN requires a certain configuration of TCP/IP or else I n t he know and I think that no one here can answer this question.

    Is that wireless network card is properly installed and works, because you can access the Internet at home.

    Sorry, but everything that s what I can say.

  • Just got 2 of SE. Weather app works on one but not the other.

    Just got 2 of SE. Weather app works on one but not the other. Ideas?

    Drosea,

    Define/describe does not.

    What's the weather App?

  • reCAPTCHA works in IE8, but not in Firefox - missing graphics

    reCAPTCHA works in IE8, but not in Firefox

    All the graphics, the challenge, radio buttons and logo do not appear.

    Make sure that you are not blocking JavaScript.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the Add-ons is the cause of the problem (switch to the DEFAULT theme: Tools > Modules > themes).

    • Makes no changes on the start safe mode window.

    See:

    See also:

  • Why did the counter works in MAX, but not of Labview?

    Please help, I've been away from Labview for more than 3 months and I'm pretty rusty...

    Last year, I configured successfully NI9401 to measure the period (in seconds) by counting the rising edges of my sensor signal.  Since then, I bought a new PC and loaded all my software inside, including the Labview VI that has worked successfully on the old computer.

    I can see the digital signal using MAX and test for the NI9401 Panel, then, I know that my son and my TTL signal is OK, but nothing except the below error when I try to run the attached VI, happens...  How can I say this VI to search for the signal on channel 14 and MOD3/CTR0?

    Thank you. I'm sure it's a small adjustment... it worked well a few months ago... do not know what the problem is now.

    Thank you

    Dave

    OK, now.  Solved the problem. The vi is fine, but some fragile son have been identified... worked in MAX but not in vi.  Now that the connections have been tightened, it works for both.  Sorry for the inconvenience.

    Dave

  • OCR has worked with xp but not windows 7

    With the help of HP C3180 all-in-One printer and Windows 7, 64-bit.

    OCR has worked with XP but not with 7.  Am I missing something?

    Hello belcanguy

    If scanning with I.R.I.S. only shows the scan to image that says Solution Center? Try I scan a document using the Solution Center and see if you can choose an OCR pdf or RTF document.

  • Why my website slider works in Chrome, but not in Internet Explorer

    Why my website slider works in Chrome, but not in Internet Explorer

    On this page it says IE version 10 uses "animation".

    & then if you look at the examples on this page it shows:

    div {}

    -webkit-animation: myfirst 5 s; / * Chrome, Safari, opera * /.

    Animation: myfirst 5 s;

    }

    So, you will need to do.

    Also, check the CSS3 menu on the left, there "transform 2D" then you should find how to join also CSS3 2D transforms

    I have never used myself these animation properties, but these pages will have the info you need.

  • Spry ToolTip works in IE but not Firefox

    Hello

    I do not understand or cannot know what I did wrong. I created a ToolTip for the manufacture of the last product (diameter of 4 inches (special order) brass water revitalizer) on page: http://www.alivewater.net/order.htm

    It works in IE but not Firefox... I can't understand why... can you help me and see what I did wrong?

    Eternally grateful,

    Starry

    The biggest problem I see with the page is that there is no defined document type.  This means browsers have to guess what validation to use to guess what effects should arrive.  If you click on edit->-> category title/encoding Page Properties, you must define the Document Type (DTD).  I.e. once set DW will define the type of document for you.  You can then save and re-upload your document and we can see if the same problem persists.

  • FlvPlayer works with FireFox but not with IE

    Hello

    I created an FLV Player to play remote. FLV movie. It works with Firefox but not with Internet Explorer 6 or 7. In fact, when I test locally on my desktop with local (on my desktop). File FLV movie player works in Internet Explorer. The problem seems to be my Web site, when reading remotely. FLV file, it only works with Firefox.

    Try my Web site with Firefox and IE 6-7 and you will see only works with Firefox. Movie player (right section) to this remote file access: http://www.wikiguitarist.com/wikiguitarist/images/9/9a/CanonFuntwo.flv .

    Since it is a Wikimedia site HTML code is generated from a PHP file. Here is the code that generates the HTML code.

    Of Internet Explorer browser only interpret the tag: < embed >?
    Why IE has problem to play remotely. File FLV and not Firefox?

    Any idea, suggest code, suggest HTLML, action script...?

    Thank you
    Alain



    Hi guys,.

    Thank you very much, Jeckyl, you were right, it seems that only FLASVARS is allowed. Nevertheless, I will try to test if I can pass more than one variable/value less a statement of FLASVARS. For the moment, leaving only a statement of FLASVARS the video works fine with IE and Firefox. I'll do a little cleanup, it is true that my generated HTML code is a bit messy.

    Thanks to WindShadow75 for your answer, now you see it works because I removed the additional declaration of FLASVARS.

    Several guys from tanks, it is appreciated!

    WikiGuitarist

  • WNDR3700 and Samsung TV: wifi but not Internet

    Hello

    I just bought a Samsung smart TV and is now trying to connect to the internet via wifi. The problem is that it connects to the router, but not to the internet.

    Other things that do not have an internet connection:
    -Cable Ethernet to the router works fine.
    -Wifi TV through my phone (connected to the internet with 4 G) works very well.
    -Wifi to my neighbor Asus router works fine.
    -When it is connected to my WiFi router, the TV responds to the ping.
    -All other devices connected to my router have access to internet.

    So, the problem seems to be with my router...

    Things I've tried but no luck:
    -Change the DNS on my TV in the local to OpenDns or Google.
    -Change the DNS on my router to the foregoing.
    -L' MAC address of the TV to give a static IP than automatic.
    -Double check that the TV using the same wifi encryption as my router.
    -The port forwarding 80 and 433 on television port.
    -Reset the TV in order to clear its DNS cache (got help from Samsung support to do this).

    Could I change in the router? It would be nice not to have to factory reset the router, since I'm not looking forward to start all my settings

    I don't think that you have a choice other than a reset to the default values.

    try to set up a network of comments without security to see if the work, then try the different security settings

  • Connected to home WiFi but not Wireless LAN home page

    This morning, everything was fine but something happened with the printer and now my laptop is all out of whack. I used to be connected to my home network where I could access all computers on the network and my hard drive Western Digital World Book Edition II. I don't know how, but now I'm out of the network. I'm always connected to the WiFi which is available in the House but I can ' t do anything else. I can't watch other computers, print or watch the WD hard drive. I tried everything to get me back on the network, but not luck.

    I am using the following:
    -IBM ThinkPad X 41 Tablet running Windows XP
    -Linksys Wireless-N Broadband Router (model number - WRT300N v1.1)
    -Canon PIXMA MX870
    -Western Digital myBook World Edition II (2 TB)

    I did steps 1 to 6, but he says still unknown

    Sorry if I wasn't clear.

    1-6 steps enable NetBIOS over TCP/IP, which is a good thing to do.  These measures do not affect the type of node.  As explained in the link nitecruzr, there is a good reason to make this explicit parameter instead of the default Windows.

    Reset the 'unknown' to 'Broadcast' node type can be performed by following the steps in KB903267 - but it is I think remember that sometimes the steps described in this article do not work and the type of node is still 'unknown '.  What I meant is that it is OK for the type of node be 'unknown '.

  • LaserJet Pro 200 color M27nw: Scan works in wifi and not available on USB key intermittently

    I am a M27nw of Color LaserJet Pro 200 and under Mac OS X 10.10.  The printer connects OK via wifi, but the analysis fails often.  Sometimes it hangs and fails when parsing the preview.  Sometimes the scanner window opens but nothing happens and everything is grey.  And then, sometimes, it works!

    When I got the printer I have connected via wifi AND USB port to a Time Capsule.  It used to work and when I opened the Printers & Scanners on my Mac I see print and Scan option.  Now, on the port USB connected for this printer, there is NO scan option.  I can't understand why he won't do it and how to get the option scan via the USB connection.  Please help someone!

    Hi @kbolenba,

    By your post, I see that you have problems with scanning by wireless and USB connection. I want to help you.

    Connect the printer directly to the Mac and add the printer again. Then test scan.

    I also suggest you do the following to help resolve the problems of scanning wireless.

    Fix permissions of the drive on the Mac:

    Close all applications.

    In the Apple menu, click OK, click Applications, and then click utilities.

    Double-click disk utility.

    Highlight your hard drive / partition on the left.

    Click on check and then repair disk permissions.

    Restart the computer...

    Reset the printing system:

    Note: This will remove all printers in the print and Fax/Scan, any printer deleted can be re-added later by clicking the sign plus (+) symbol.

    Click on the Apple icon and then click on System Preferences.

    Click on Printers & Scanners.

    Make a right click (or Ctrl + click) in the left white side panel, and then click Reset printing system.

    Click OK to confirm the reset.

    Type the name and the correct password.

    Click OK to reset the printing system.

    Then click on the sign to add the driver, highlight the printer +. (you may need to click the drop down menu to select the name of the printer) Then click the Add button.

    If you appreciate my efforts, please click on the "Thumbs up" button below.
    If there is anything else I can help you, let me know. Thank you.

  • Check for Wifi but not connected

    Hello

    I try to detect the State when the wifi is enabled but not connected to a wireless network:

    if(RadioInfo.getSignalLevel(RadioInfo.WAF_WLAN)==RadioInfo.LEVEL_NO_COVERAGE){
    

    but it does not work. What is the correct way to do this?

    Check the radioinfo to be connected, but not being coverageinfo is not on the level of correct coverage.

  • my site works in IE but not firefox

    This is my web page:
    http://www.Andrew-Leonard.co.UK/Mallorca/Mallorca%20ferns.htm

    It usess css to define the layers and javascript to show and hide layers. It uses a system of dhtml menu by Milonic to run javascript code

    This is part of the code for layers:

    <style type="text/css">
    #Layer01 {position: absolute; left: 300px; top: 50px; z-index:1;}
    ...........
    #Layer33 {position: absolute; left: 300px; top: 50px; z-index:33;}
    </style>

    This is part of the javascript to show/hide layers:

    <script>
    function showlayer(layer){
    var myLayer = document.getElementById(layer).style.display;
    if(myLayer=="none"){
    document.getElementById(layer).style.display="block";
    } else {
    document.getElementById(layer).style.display="none";
    }
    }
    </script>

    It works OK in IE but not firefox

    If you select Web Console of Firefox (Ctrl + Shift + K), it will tell you errors is to find and the line of code that is found on.
    The problem, it seems to have at the front is that IDS are case-sensitive: 'layer02' is not the same thing as "Layer02", for example.

    There may be errors once again it happened, but all current browsers come with tools that needed to rule out any other problem.

    In addition to the Javascript reference: https://developer.mozilla.org/en-US/docs/JavaScript

  • My SWF.flash files sites work on IE but not firefox, help please?

    I have a portfolio built with flash on my new site which works fine with IE, but not firefox, is there an additional coding I have to add to make it appear in firefox?

    This code should work:

    <object data="/userfiles/flash/FINE ART FLASH.swf" type="application/x-shockwave-flash" height="450" id="FlashID" width="700">
    <param name="allowFullScreen" value="true" />
    <param name="loop" value="false" />
    <param name="play" value="false" />
    <param name="scale" value="exactfit" />
    <param name="movie" value="/userfiles/flash/FINE ART FLASH.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="transparent" />
    <param name="bgcolor" value="#303030" />
    <param name="allowScriptAccess" value="samedomain" />
    <param name="swfversion" value="9.0.45.0" />
    </object>

Maybe you are looking for