Using the following Cordova plugin you can measure the type of connections your device is making use and based upon that you could do actions.
states[Connection.UNKNOWN] = 'Unknown connection';
states[Connection.ETHERNET] = 'Ethernet connection';
states[Connection.WIFI] = 'WiFi connection';
states[Connection.CELL_2G] = 'Cell 2G connection';
states[Connection.CELL_3G] = 'Cell 3G connection';
states[Connection.CELL_4G] = 'Cell 4G connection';
states[Connection.CELL] = 'Cell generic connection';
states[Connection.NONE] = 'No network connection';
If for example you pick CELL_2G
it will represent the following speed
2G Data Transmission Capacity: With General Packet Radio Service
(GPRS), there is a theoretical maximum transfer speed of 50 kbit/s (40
kbit/s in practice). With EDGE (Enhanced Data Rates for GSM
Evolution), there is a theoretical maximum transfer speed of 1 Mbit/s
(500 kbit/s in practice).