i want to ask that it is possible to find the download/upload speed on android when an application send some data out form the device or receive from outside.if yes than how can we do this. i think one option can be PacketManager API but i am not sure. we can have the ports than listen the ports for traffic and than simple formula for speed. What permission we need for this.(rooted or no rooted permission req) thanks
Asked
Active
Viewed 4,622 times
2
-
Take a look at this: https://stackoverflow.com/a/53539175/1631967 – aminography May 04 '19 at 06:21
1 Answers
2
You should try to use the TrafficStats
class in order to do this.
You can find more information about this here :
TrafficStats Class - Download and Upload Speed Android
Another good link with some code in order to help you : Network Monitor Android TrafficStats Class
-
the link was broken http://stackoverflow.com/questions/8252656/how-to-get-download-speed-in-android-device-or-mobile – Shailendra Madda Dec 08 '16 at 10:52