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
ajaysainsgvu
Posts: 242
Registered: ‎02-19-2013
My Device: 9500
My Carrier: _

Fetch the mobile internet usage programatically

I want to fetch the mobile internet usage programatically. How can i fetch the mobile internet in blackberry.

Please use plain text.
Developer
peter_strange
Posts: 19,595
Registered: ‎07-14-2008
My Device: Not Specified

Re: Fetch the mobile internet usage programatically

Search the forum for information on:

 

RadioInfo.getNumberOfPacketsSent

RadioInfo.getNumberOfPacketsReceived

 

These are byte counters not packets but have a number of limitations noted in various forum Threads.

Please use plain text.
Developer
ajaysainsgvu
Posts: 242
Registered: ‎02-19-2013
My Device: 9500
My Carrier: _

Re: Fetch the mobile internet usage programatically

How to check internet usage is done by wifi or gprs programtically

Please use plain text.
Developer
peter_strange
Posts: 19,595
Registered: ‎07-14-2008
My Device: Not Specified

Re: Fetch the mobile internet usage programatically

Search the forum, this question has also been answered previously. 

 

From memory there is no official way to do this, the only option is to check the connections in use and make an assumption. 

Please use plain text.
Developer
ajaysainsgvu
Posts: 242
Registered: ‎02-19-2013
My Device: 9500
My Carrier: _

Re: Fetch the mobile internet usage programatically

I search did not find can you please give the link to me.

Please use plain text.
Developer
peter_strange
Posts: 19,595
Registered: ‎07-14-2008
My Device: Not Specified

Re: Fetch the mobile internet usage programatically

I do not have the link, as noted, my comment was from memory.  Keep searching or trust my memory.

Please use plain text.
Developer
ajaysainsgvu
Posts: 242
Registered: ‎02-19-2013
My Device: 9500
My Carrier: _

Re: Fetch the mobile internet usage programatically

Can you give the how can i check the mode of internet. For ex when device is connected to GPRS or wireless. I need these . How can i do this.

Please use plain text.
Developer
simon_hain
Posts: 15,806
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Fetch the mobile internet usage programatically

you cannot. as a workaround you could run the methods mentioned above continously and check the routing using CoverageStatusListener, but it would be more or less guessing.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
ajaysainsgvu
Posts: 242
Registered: ‎02-19-2013
My Device: 9500
My Carrier: _

Re: Fetch the mobile internet usage programatically

@Simon. But how can i idenfiy whether it is connected wifi or Mobile Packet data. Please share the some peice of code .

Please use plain text.
Developer
simon_hain
Posts: 15,806
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Fetch the mobile internet usage programatically

using http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/CoverageInfo.html#isCov... with the appropriate wafs
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.