BlackBerry 8330 connection issue
I'm able to connect to a webservice and download the data using a variety of devices, such as the BlackBerry 9000 with OS 4.6 or greater.
However, with the 8330 and OS 4.5.0.77 it doesn't work. I have not tried this code on any devices older than the 8330 with 4.5.0.77.
On the 8330 it hangs on the resultObj = op.invoke(inputObject);
line in the JSR172 webservice call. This is after making the first webservice call successfully -- it hangs on the second.
There are actually two webservices:
- The webservice used for authentication.
- The webservice used to download all the information.
Things I've tried thus far:
- Wiping the device - did nothing
- Conne开发者_如何学Gocting the device to Eclipse to see what is going on - didn't find anything useful
- Running the code on a 8330 simulator with 4.5 (MDS running)- works flawlessly with no problems
Does anyone know how to fix this issue?
Here is how I build my connection string:
String webserviceURL = developmentUrl;
// if it is simulator then force the network that is available on
// the PC
if (DeviceInfo.isSimulator()) {
webserviceURL += ";deviceside=true";
} else if ((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_MDS) == CoverageInfo.COVERAGE_MDS) {
// go through MDS
webserviceURL += ";deviceside=false";
}
// else if ((CoverageInfo.getCoverageStatus() &
// CoverageInfo.COVERAGE_CARRIER) == CoverageInfo.COVERAGE_CARRIER)
// {
// webserviceURL += "'deviceside=true";// go direct
// }
// check if the wifi is available and change the url to use the wifi
// signal
if ((RadioInfo.getActiveWAFs() & RadioInfo.WAF_WLAN) != 0)
// check for carrier
{
if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED)
// check for wifi
{
// WebService URL when the app is being used in the
// actual device
webserviceURL = webserviceURL + ";interface=wifi";
}
}
// WebService URL when the app is being used in the actual device
_propertyValues = new Object[] { webserviceURL };
I was able to solve this problem by going to ~50k chunks for the data. I'm happy to help anyone who has a similar issue.
精彩评论