05-31-2009 10:52 AM
Though 4.2.x API does not show COVERAGE_BIS_B as a constant in the CoverageInfo class, it is actually there, so that part of the code should both compile and work.
You may however need to change the COVERAGE_DIRECT to COVERAGE_CARRIER (There is no difference, both of them have the same value 1)
06-01-2009 09:39 AM
Just to bump this thread up that a reply got updated ..
Updated URL:
http://supportforums.blackberry.com/rim/board/mess
Thanks to andy for editing the post..
06-03-2009 02:16 AM
Hi adwiv.
I am trying your code. But I need your support.
In your code, IOPreferences.getPreferredConnectionType() method not exists.
I think this method is very important to detect the connection.
So, can you post this method ?
Thanks in advance.
06-05-2009 06:24 AM
Hi Raiden,
IOPreferences is a user preferences class where users can define their preferred connection method. For example, some people prefer to use the TCP/IP instead of going through the MDS or if the office MDS goes through a proxy.
The getPreferredConnectionType() method would return the preferred connection if set. You may need to setup a screen where the user can change this. It is only useful if you want to give people a choice ![]()
06-09-2009 05:39 PM
Sorry, but what does it mean by XXXXXXXXXXXXXXXXXX ?
case CONNECTION_BIS:
url = url + ";XXXXXXXXXXXXXXXX";
break;
06-10-2009 12:42 AM
That is the connection suffix for BIS-B kept secret.. ![]()
Read this post
http://supportforums.blackberry.com/rim/board/mess
especially, the words that are bold..
Cheers...
06-22-2009 04:24 AM
Hi Adwiv.
I've reviewed your code. There is an interesting code following as :
if (requestHeaders != null) {
String referer = requestHeaders.getPropertyValue("referer");
boolean sendReferrer = true;
if (referer != null &&
StringUtilities.startsWithIgnoreCase(referer, "https:") &&
!StringUtilities.startsWithIgnoreCase(url, "https:")) {
sendReferrer = false;
}
int size = requestHeaders.size();
for (int i = 0; i < size
{
String header = requestHeaders.getPropertyKey(i);
// remove header if needed
if (!sendReferrer && header.equals("referer")) {
requestHeaders.removeProperty(i);
--size;
continue;
}
String value = requestHeaders.getPropertyValue(i++);
if (value != null) {
conn.setRequestProperty(header, value);
}
}
}
Does need this setting property code necessarily to create HTTP connection ?
How to infect for the connection ?
Thanks man.
06-25-2009 07:36 PM
"Wifi for free in a BES device, will only occur, when the Wi-Fi can connect back to the home BES. So to get Wi-Fi, you must have an active wireless (SIM card) connection. This will contact the BES, and then the Wi-Fi will also try to connect the BES. If it can get through (which in most circumstances, will mean that the Wi-Fi network is within the corporate network) then the device will swap to using Wi-Fi for everything."
To clarify what you mentioned, the device will swap to using Wi-Fi only for the new connections the device will make. For the existing connections, the communication will NOT swap to Wi-Fi. For these connections, if you prefer Wi-Fi, you explicitly need to close these connections. And then, open them again. Am I correct?
06-26-2009 03:19 AM
Hi Raiden,
In most cases, request headers are not used and we can skip this block of code completely. It would only be necessary if we want to pass some custom headers in the request, which is often not the case.
Cheers.
06-26-2009 12:08 PM - last edited on 06-26-2009 12:13 PM
peter_strange wrote:
1) You can't connect directly to localhost or 127.0.0.1. So if you have your Web Server running in the same machine as your simulator and you want to connect, use a URL that will resolve to your machine's real IP address