How to determine if a BlackBerry device has Bis-B access?
I have a BlackBerry app that performs a variety of tasks by accessing various network resources. I have a new requirement for the app that one of these tasks has to connect to the Internet via Bis-B, and if the device i开发者_运维问答sn't able to do Bis-B the app should not allow the user to perform the task in the first place.
The way to connect via Bis-B is to append this to the URL you are trying to access:
;deviceside=false;ConnectionType=mds-public
For devices that are on Bis-B this URL suffix works and the connection is made through Bis-B.
The problem that I'm having is with devices that aren't on Bis-B. I had assumed that if I appended the above to the URL and then attempted to connect, the attempt would fail (and I could then trap it and use that to determine that the device isn't on Bis-B). Unfortunately, what actually happens is that the first one or two attempts succeed, but the second or third attempt fails with "Network could not be detected. Please try again later." After this happens, all subsequent network requests fail with the same message, even the calls that don't use the Bis-B URL suffix. After 10-15 minutes something seems to clear up and then all non-Bis-B network requests start working again.
So I'm naturally puzzled, and I'm looking for some way to reliable detect whether or not a device is on Bis-B. I know that the devices themselves can tell, because the wifi icon in the upper right corner of the BB screen is bright white if the device is on Bis-B and gray when it isn't.
I'm looking for some way to reliable detect whether or not a device is on Bis-B. I know that the devices themselves can tell, because the wifi icon in the upper right corner of the BB screen is bright white if the device is on Bis-B and gray when it isn't.
I have found the blackberry dots indicate whether you are on BIS or not. They will appear next to the 3g/edge indicator if BIS is routing over the cellular network, or they will appear next to the wifi indicator if BIS is routing over wifi.
I'm looking for some way to reliable detect whether or not a device is on Bis-B.
CoverageInfo.getCoverageStatus() returns a bitfield, and one of the bits is CoverageInfo.COVERAGE_BIS_B. My understanding is this bit corresponds to the blackberry dots appearing in the connection status area of the home screen.
精彩评论