2

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

user1286030
  • 57
  • 1
  • 4

1 Answers1

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

Community
  • 1
  • 1
ChapMic
  • 26,954
  • 1
  • 21
  • 20