Simple plugin that returns if af Celluar Connection isFast or slow.
Uses CTTelephonyNetworkInfo.currentRadioAccessTechnology
Based on http://www.codeitive.com/0iHVjkVgek/detect-carrier-connection-type-3g-edge-gprs.html
Clone the plugin
Create a new Cordova Project
Install the plugin
Edit www/js/index.js
and add the following code inside onDeviceReady
var success = function(message) {
alert(message);
}
var failure = function() {
alert("Error calling Hello Plugin");
}
currentradioaccesstechnology.isFast(function(isFast) {
if (isFast) {
isFastCallback();
} else {
Ext.Msg.alert('Netzwerk', 'Bitte stellen Sie eine WLAN oder UMTS Verbindung her');
}
}, function(error){
console.log(error);
});
Install iOS platform
cordova platform add ios
Run the code
cordova run
Uses private API. Not for Appstore Releases
For more information on setting up Cordova see the documentation
For more info on plugins see the Plugin Development Guide