BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-24-2007, 06:28 AM   #1 (permalink)
New Member
 
Join Date: Sep 2007
Model: 8100
PIN: N/A
Carrier: 12345
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default RadioInfo.isDataServiceOperational

Please Login to Remove!

Hi,

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) &&
(RadioInfo.isDataServiceOperational()) &&
(!RadioInfo.isDataServiceSuspended())
);

It returns true even if there is no SIMCARD inserted, i.e. data service won't be available.

Can anyone point out my problem ??

Thanks
Thomas
Offline  
Old 10-24-2007, 09:49 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: May 2005
Location: Golden, CO US
Model: 9700
Carrier: ATT
Posts: 684
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I wasn't able to get it to report properly either. Have a look at CoverageInfo. It seems to be a little more reliable.
Offline  
Old 10-24-2007, 09:48 PM   #3 (permalink)
New Member
 
Join Date: Sep 2007
Model: 8100
PIN: N/A
Carrier: 12345
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you RemyJ, CoverageInfo works in this case, my updated code is
Code:
        return ((RadioInfo.getState()==RadioInfo.STATE_ON) &&
                (RadioInfo.getNetworkType() == RadioInfo.NETWORK_GPRS) &&
                ((RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_DATA) != 0) &&
                ((RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_EMERGENCY_ONLY) == 0) &&
                (RadioInfo.getSignalLevel()!=RadioInfo.LEVEL_NO_COVERAGE) &&
                (RadioInfo.isDataServiceOperational()) &&
                (!RadioInfo.isDataServiceSuspended()) &&
                (!CoverageInfo.isOutOfCoverage())
               );
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.