mirror of
https://gitee.com/shuto/cordova-plugin-network-information.git
synced 2025-01-31 18:47:21 +08:00
Adding notification for CT radio information
This commit is contained in:
parent
791d828fd4
commit
3bf19c4c02
@ -58,6 +58,7 @@
|
|||||||
if (isConnectionRequired) {
|
if (isConnectionRequired) {
|
||||||
return @"none";
|
return @"none";
|
||||||
} else {
|
} else {
|
||||||
|
if ([[[UIDevice currentDevice] systemVersion] compare:@"7.0" options:NSNumericSearch] != NSOrderedAscending) {
|
||||||
CTTelephonyNetworkInfo *telephonyInfo = [CTTelephonyNetworkInfo new];
|
CTTelephonyNetworkInfo *telephonyInfo = [CTTelephonyNetworkInfo new];
|
||||||
if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyGPRS]) {
|
if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyGPRS]) {
|
||||||
return @"2g";
|
return @"2g";
|
||||||
@ -82,6 +83,7 @@
|
|||||||
} else if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyLTE]) {
|
} else if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyLTE]) {
|
||||||
return @"4g";
|
return @"4g";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return @"cellular";
|
return @"cellular";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user