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.
i making a application where i need total amount of data used by user
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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()andThese 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.