From 4.2.0, there is two new method in RadioInfo called isDataServiceOperational() and isDataServiceSuspended().
I have tried to turn off data services in Options -> Mobile Network, but isDataServiceOperational() still return true, and isDataServiceSuspended() still return false.
I would like to know how the setting can be obtained, or is it a way to determine whether the handheld have data service or not... here is my code for 4.2.0 :
return ((RadioInfo.getState()==RadioInfo.STATE_ON) &&
(RadioInfo.getNetworkType() == RadioInfo.NETWORK_GPRS) &&
((RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_DATA) != 0) &&
(RadioInfo.getSignalLevel()!=RadioInfo.LEVEL_NO_CO VERAGE) &&
It returns true even if there is no SIMCARD inserted, i.e. data service won't be available.
Can anyone point out my problem ??
I wasn't able to get it to report properly either. Have a look at CoverageInfo. It seems to be a little more reliable.
Thank you RemyJ, CoverageInfo works in this case, my updated code is
|All times are GMT -5. The time now is 12:11 AM.|
Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.