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
Developer
Posts: 32
Registered: ‎09-29-2008
My Device: Not Specified
Accepted Solution

Monitoring Data Usage

I have a request to add monitoring of the phones data usage (Edge/GPRS/etc) to our application, I've searched the SDK and nothing springs out Smiley Sad can anyone point me in the right direction?

 

It doesn't have to be realtime though that would be nice but monitoring of logs after the fact would be fine.

 

It appears possible since the MiniMoni application (http://www.ehnert.net/MiniMoni/) does it.

 

Thanks,

 

Lindsay

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

Re: Monitoring Data Usage

You can use the getNumberOfPacketsSent and getNumberOfPacketsReceived methods of the RadioInfo class, which provide the number of IP bytes sent and received.

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: 32
Registered: ‎09-29-2008
My Device: Not Specified

Re: Monitoring Data Usage

Thanks Mark, that is useful *but* I see now way to determine what the packet size is, hence no way to calculate the number of bytes sent/received.

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

Re: Monitoring Data Usage

The methods do actually provide the number of bytes sent and received.  Their name is a bit misleading.

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: 32
Registered: ‎09-29-2008
My Device: Not Specified

Re: Monitoring Data Usage

 


MSohm wrote:

The methods do actually provide the number of bytes sent and received.  Their name is a bit misleading.


 

Hee! Indeed - thanks Smiley Happy

 

One last question the docs say "Returns -1 where not supported", what is that dependant ion? firmware level on the BB? carrier dependant? something else?

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

Re: Monitoring Data Usage

These methods are not supported for the CDMA wireless access family (WAF_CDMA).

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: 32
Registered: ‎09-29-2008
My Device: Not Specified

Re: Monitoring Data Usage

Cool, thanks.

Highlighted
Regular Contributor
Posts: 64
Registered: ‎01-27-2011
My Device: Not Specified

Re: Monitoring Data Usage

Hi Mark,

 

How can one determine the data usage on a CDMA device? Is there an alternative to these methods that can be used for a CDMA phone?

 

Thanks.

New Contributor
Posts: 2
Registered: ‎01-06-2012
My Device: curve
My Carrier: blackberry

Re: Monitoring Data Usage

Hi spardan,

 

Got any solution to find the data usage in CDMA blackberry devices?

 

//Suman