Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I programmatically detect EDGE network or bad network in iPhone?

I need to detect the EDGE network and bad network in the iPhone.

1) How to detect the bad network ?

2) Is it possible to detect EDGE network separetly ?

3) How can I get the strength of the network ?

Please give some answer about these questions. Thanks in advance.

like image 525
Mani Avatar asked Nov 15 '13 11:11

Mani


1 Answers

On iOS7, you can!

http://www.objc.io/issue-5/iOS7-hidden-gems-and-workarounds.html

CTTelephonyNetworkInfo *telephonyInfo = [CTTelephonyNetworkInfo new];
NSLog(@"Current Radio Access Technology: %@", telephonyInfo.currentRadioAccessTechnology);
[NSNotificationCenter.defaultCenter addObserverForName:CTRadioAccessTechnologyDidChangeNotification 
                                                object:nil 
                                                 queue:nil 
                                            usingBlock:^(NSNotification *note) 
{
    NSLog(@"New Radio Access Technology: %@", telephonyInfo.currentRadioAccessTechnology);
}];
like image 93
Léo Natan Avatar answered Nov 10 '22 07:11

Léo Natan