hello. i making a application where i need total amount of data used by user by accessing internet. how could i get that value. plz help me send the code.
+1
A:
Unfortunately there are no APIs to directly get the amount of data used in KB.
The methods that come closest are
net.rim.device.api.system.RadioInfo.getNumberOfPacketsReceived()
and
net.rim.device.api.system.RadioInfo.getNumberOfPacketsSent()
These give you the number of IP packets sent/received. MTU (Maximum Transmission Unit) for a packet over a cellular radio is usually around 600-1200 bytes, so you can get an approximation, but individual packets may differ by a few hundred bytes, so you can't get an exact amount. Depending on your app, this may be enough.
Anthony Rizk
2010-08-20 00:57:08
thnks alot..how to listen for whenever internet is statting or ending.
amit
2010-08-21 06:20:44