BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 10-24-2007, 05: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, 08: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, 08: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

20PCS Orange 2V 3mm Light Emitting Diodes 2 Pin LEDs Round Bulb 10000-12000mcd
$0.11
20PCS Orange 2V 3mm Light Emitting Diodes 2 Pin LEDs Round Bulb 10000-12000mcd picture3 RadioShack 0.01uF Metal-Film Capacitor #272-1051
$6.0
3 RadioShack  0.01uF Metal-Film Capacitor #272-1051 pictureMS8910 Auto Scanning SMD RC Diode Tester Resistance Capacitance Tweezers Meter
$15.98
MS8910 Auto Scanning SMD RC Diode Tester Resistance Capacitance Tweezers Meter pictureAndo AQ4213 1310nm/1550nm LD Laser Diode Plug-In/Module for Optical Multimeters
$424.99
Ando AQ4213 1310nm/1550nm LD Laser Diode Plug-In/Module for Optical Multimeters pictureMASTECH MS8910 Auto Scanning Resistance Capacitance Diode Tester Capacitor SMD
$16.39
MASTECH MS8910 Auto Scanning Resistance Capacitance Diode Tester Capacitor SMD picture






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