Listen to current network traffic in the app and categorize the quality of the network.
Network Connection Class is an Android library that allows you to figure out the quality of the current user's internet connection. The connection gets classified into several "Connection Classes" that make it easy to develop against. The library does this by listening to the existing internet traffic done by your app and notifying you when the user's connection quality changes. Developers can then use this Connection Class information and adjust the application's behaviour (request lower quality images or video, throttle type-ahead, etc).
The Network Connection Class library takes care of spikes using a moving average of the incoming samples, and also applies some hysteresis