04-06-2009 01:10 PM
I am working on an application that will work with our web server over HTTP and HTTPS.
As this is a consumer application, we want to make it work without MDS, out-of-the-box when a smartphone is purchased retail with a web access data plan.
I assumed that this means using Direct TCP when Wi-Fi is not available.
The following code snippet prepares the URL depending on configuration and opens the connection:
String fullUrl = (isSecure ? "https://" : "http://") + appConfig.getServerHost() + "/" + url + (bbAppState.isWiFiOnly() ? ";interface=wifi" : "") + (bbAppState.isDeviceSide() ? ";deviceside=true" : "");
c = (HttpConnection) Connector.open(fullUrl, Connector.READ_WRITE, true);
Device and network details:
T-Mobile US network
Have a data plan (Unlimited web and 400 messages)
Connection preference: Wi-Fi preferred
No apn is specified
Browser and third party apps downloaded from App World can access internet via both Wi-Fi and EDGE/GPRS with the settings above
My question is if I am doing something wrong, or missing something. My hypothesis is that the browser and third-party apps use BlackBerry Internet Service. Is there a way to find out? Is there a way to disable it (e.g. to make sure the browser and other apps do use it)? Our company recently became a BlackBerry Alliance Partner, so we can apply for BlackBerry Internet Service, but I don't understand if this is needed for consumer applications, or whether consumer applications should rely on Direct TCP.
Any help will be greatly appreciated.
Solved! Go to Solution.
04-06-2009 01:36 PM
To use ";deviceside=true", you also have to specify the APN details, either in the options for the device or in the string that you supply with ";deviceside=true". if you don't, you will get "Tunnel failed".
I would confirm the APN settings for T-Mobile - the value you used doesn't match what I find in a google search.
Browser and other apps will use either WAP 2.0 or BIS-B, both of which don't require any configuration. You could use WAP 2.0 - the standard KB article for details:
What Is - Different ways to make an HTTP or socket connection
Recommendation - Use BIS-B (Alliance Partner service) if you can, works in more cases that anything else.
04-06-2009 02:49 PM
Thank you so much Peter!
To test quickly, I put in wap.voicestream.com into the APN name and it worked. Thanks for sending the link describing how to enumerate service entries to make it generic.
One thing I've noticed connecting through WAP was a considerable latency added on top of the usual 1sec EDGE latency - I would say extra 3-4 seconds were added. Is this normal for WAP gateways? Do you happen to know if latency is better with BIS?
Thanks again for your help!
04-06-2009 04:04 PM