07-18-2008 01:55 AM
Hi guys, I only just found this forum and I've already written code for activating and deactivating radio. I saw a solution posted on this forum but am wondering if mine is also correct, take a look and let me know if you think it wouldn't work:
//This will check to see if GPRS is disabled. if (net.rim.device.api.system.RadioInfo.isDataService
Operational()==false){ //If radio (GPRS) is disabled, this will enable it. net.rim.device.api.system.Radio.activateWAFs(net.r im.device.api.system.RadioInfo.NETWORK_GPRS); }
This should re-enable radio so that an application can connect to the net? I did a small amount of testing and it seemed to work fine.
07-18-2008 10:52 AM
Only the RadioInfo.WAF_* constants should be passed into the activateWAFs method.
08-04-2008 01:54 AM
I have a problem with a thread that sends information back to our server via GPRS (EDGE).
If radio is turned off, for example from Manage Connections->Turn all connections off
The following code in a simulator environment will turn the radio (GPRS/EDGE) back on:
int iState = RadioInfo.getState(); if (iState==0){ //switches the network on Radio.activateWAFs(RadioInfo.WAF_3GPP); //for GSM Radio.activateWAFs(RadioInfo.WAF_CDMA); //for CDMA }
However, it DOESN'T work on a BB 8800 or BB 8110. Has anyone else tested this on an actual handset and not just the simulator?
08-07-2008 11:46 AM