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
Highlighted
Developer
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Is there any way to disable data service on/off or data roaming on/off in blackberry?

Hi,

 

I want to off data service and data roaming programmatically but without closing network. So please help me for this

 

Thanks & Regards

Trusted Contributor
Posts: 160
Registered: ‎11-17-2010
My Device: PlayBook, Z10, Q10

Re: Is there any way to disable data service on/off or data roaming on/off in blackberry?

Hello,

 

What is the purpose? Do you want your application to avoid connecting when the device is in roaming?

Then probably you should just simply check with RadioInfo.getNetworkService() if it is roaming and then use a proper connection string for WiFi-only connections (append ;deviceside=true;interface=wifi to the connection string).

 

If your purpose is to really switch connections on/off, then probably Radio.activateWAFs, Radio.deactivateWAFs can do that. So far I have only used these to switch WiFi on and off.

Here is a nice short article about the topic: https://developer.blackberry.com/java/documentation/radios_1984477_11.html

--
If you find this post useful please Like it.
If it solves your problem please mark as solution.
Developer
Posts: 354
Registered: ‎06-05-2013
My Device: Blackberry Z10
My Carrier: Vodafone

Re: Is there any way to disable data service on/off or data roaming on/off in blackberry?

yes i want to stop data connection but not mobile network. if we use Radio.activateWAFs, Radio.deactivateWAFs then it will be close mobile network also i want to avoid it