I am developing an application which sends some data to the server. I dont want my application to disturb other applications data transfer. I want to listen to the uplink status and check if its free before starting my transmission. I looked through the TrafficStats, ConnectivityManager and NetworkInfo classes but could only find the data usage amount only. Is there any listener I can register to, to get the current uplink or downlink stats ? Any help would be appreciated. Thanks.
Share
There is no real concept of “free” here. You can use
TrafficStatsto measure bandwidth consumption over some brief period of time, to see if other apps are doing much at the moment.No.