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
New Contributor
Posts: 3
Registered: ‎02-24-2012
My Device: developer
My Carrier: at&t

Data usage for WiFi and Cellular

I know there's no way we can easily separatee data usage for WiFi and cellular usage. But is there a way we can get a trigger when the user switches networks (I do not want to poll as this might not give accurate information), so that we can use a separate counter to check the RadioInfo interface for getNumberOfPacketsSent() and getNumberOfPacketsReceived() operations?

Developer
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Data usage for WiFi and Cellular

Hi,

 

Check out the RadioStatusListener:

http://www.blackberry.com/developers/docs/6.0.0api/index.html?net/rim/device/api/system/RadioInfo.ht...

 

Can you explain the difficulty you are having to separate the data usage?

 

Since you need to set and configure the transport that you are using, that should be pretty simple, no?

 

E.

Contributor
Posts: 15
Registered: ‎01-27-2012
My Device: none
My Carrier: none

Re: Data usage for WiFi and Cellular

How to use RadioStatusListener?

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Data usage for WiFi and Cellular

What don't you understand?

Contributor
Posts: 15
Registered: ‎01-27-2012
My Device: none
My Carrier: none

Re: Data usage for WiFi and Cellular

No, A little explanation will surely help.

Contributor
Posts: 41
Registered: ‎11-11-2010
My Device: Not Specified

Re: Data usage for WiFi and Cellular

[ Edited ]

The docs are not all that helpful for this API. Would any of the methods be able to indicate a change in network type, as determined by RadioInfo.getNetworkService()?(http://supportforums.blackberry.com/t5/Java-Development/Detecting-network-connection-type-on-blackbe...

 

I am interested in listening for a change in 3G/Wi-Fi/EDGE activation from a background thread.