Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
BlackBerry Development Advisor
Posts: 15,698
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Data service turned off

Quote from previous forum:


Guest
Data service turned off
Posted: Jul 10, 2008 7:02 PM
Reply
How can I detect that the data service is turned off or suspended when the network is still up. The case can be created by going to "Manage Connections" on the home screen,leave the "Mobile Network" checked- Select Network Options, then turn off "Data Services".

I am using RadioInfo.isDataServiceOperational() and
RadioInfo.isDataServiceSuspended(), but none of them is returning the correct value.

Am I using the wrong API? If so, what should I use to detect that the "Data Services" is off.

Thanks

 


msohm

Posts: 2,227
Registered: Jul, 2005

Re: Data service turned off
Posted: Jul 11, 2008 10:48 AM
Reply
Please have a look at the code used in the developer knowledge base article below.

How To - Determine when to route data
DB-00485
http://tinyurl.com/2hv32n

Mark Sohm
BlackBerry Developer Journal
www.blackberrydeveloperjournal.com

 

Guest
Re: Data service turned off
Posted: Jul 11, 2008 4:46 PM
Reply
Mark, thanks for the reply.
I tried what was mentioned in the article, but it does not work. The state still shows that there is a data coverage even when the dataServices are turned off.
So the case I am testing is the following:
The Radio is on, but the user disabled the dataServices as described in my initial message. The BB browser detects this as soon as it is invoked. How does it do that?

I have been able to reproduce this behaviour and will look into it further.  However, as a work around you could use the CoverageInfo.isCoverageSufficient method to check for both MDS and direct TCP coverage.  This method does take into account the users data service setting.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 81
Registered: ‎07-16-2008
My Device: Curve - 8320
My Carrier: AirTel

Re: Data service turned off

[ Edited ]

I tried to query different APIs and compare their results in order to conclude. The following is recorded after turning OFF the data services on a GSM SIM-


    1) RadioInfo.getActiveWAFs() & RadioInfo.WAF_3GPP returns Non ZERO    // 3GPP is Active
    2) CoverageInfo.isCoverageSufficient(CARRIER) returns false                   // Carrier coverage is not Sufficient
    3) CoverageInfo.isCoverageSufficient(MDS) returns false                        // MDS coverage is not Sufficient

 

I was expecting that the Coverage of Carrier (WAP, Direct TCP) and MDS (BES) is Available, however not used by the device, since it is explicitly turned OFF at the device end. But the result is not similar to what I was expecting. On the other hand, WAF_3GPP was explicitly turned Off, so it shouldn't be reported as Active.

 

Am I expecting incorrectly or there is some thing wrong with these APIs ?

 

Thanks,

Message Edited by VipulPathak on 08-04-2008 07:04 PM
*(Vipul)() ;
Developer
Posts: 81
Registered: ‎07-16-2008
My Device: Curve - 8320
My Carrier: AirTel

Re: Data service turned off

Any one ?

 

Thanks,

 

*(Vipul)() ;
BlackBerry Development Advisor
Posts: 15,698
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Data service turned off

The APIs are working as designed.  The RadioInfo class works at a lower level than CoverageInfo.  When you turn data services off on the BlackBerry side, it only disables it on the BlackBerry itself.  The radio/carrier side still allows for this, which is what the RadioInfo class is returning.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 10
Registered: ‎07-18-2008
My Device: Not Specified

Re: Data service turned off

Mark,

In your post in

 http://tinyurl.com/2hv32n

I can see that you are using 

ServiceRouting.getInstance().isServiceRoutable()

method that cannot be found in public API . Is it still safe to use this unpublished API?

Or, should we use isSerialBypassActive() ? What would be the differnece then?

Also, what kind of values can be passed to isDataRoutable() as serviceUID parameter?

Thanks.

BlackBerry Development Advisor
Posts: 15,698
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Data service turned off

The isSerialBypassActive method should be the one used.  Thanks for pointing this out, I will have the article updated.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 87
Registered: ‎08-25-2009
My Device: Not Specified

Re: Data service turned off

What string values can be passed as serviceUID in isDataRoutable() ?

Highlighted
New Contributor
Posts: 5
Registered: ‎07-11-2011
My Device: Storm 2 9550
My Carrier: Verizon

Re: Data service turned off

I found that, RIM does not provide API to turn off data services, so may we have to work around by use PersistentObject to change data services value. May the code like this:

 

PersistentObject persist = PersistentStore.getPersistentObject( OptionsDataServicesData.ID );

persist.setContents( new OptionsDataServicesData() );

persist.commit();

 

OptionsDataServicesData.ID is a unique long number, example: long MY_DATA_ID = 0x33abf322367f9018L;

 

but I don't know exactly value. Could someone know value of this ID?

New Contributor
Posts: 5
Registered: ‎07-11-2011
My Device: Storm 2 9550
My Carrier: Verizon

Re: Data service turned off

Can anyone help me, please?