Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Measuring cellular signal strength

I am developing a non-appstore app for iOS. I want to read the cellular signal strength in my code.

I know Apple doesn't provide any API by which we can achieve this.

Is there any private API that can be used to achieve this? I have gone through the various threads regarding this issue but could not find any relevant info.

It is completely possible because there is an app in the app-store for detecting the carrier's signal strength.

like image 739
bhatti Avatar asked Feb 10 '11 07:02

bhatti


People also ask

Is there an app to measure cell signal strength?

Open Signal This is an iphone signal strength app, that is also available at the Playstore for Android users to enjoy. It will check your 3G, 4G or Wifi signal, giving you comprehensive data on all the devices, routers and mobile phone antennas.


1 Answers

Get signalStreght IOS9:

UIApplication *app = [UIApplication sharedApplication];   NSArray *subviews = [[[app valueForKey:@"statusBar"]     valueForKey:@"foregroundView"] subviews];   NSString *dataNetworkItemView = nil;        for (id subview in subviews) {      if([subview isKindOfClass:[NSClassFromString(@"UIStatusBarSignalStrengthItemView") class]])      {           dataNetworkItemView = subview;           break;       }    }   int signalStrength = [[dataNetworkItemView valueForKey:@"signalStrengthRaw"] intValue];   NSLog(@"signal %d", signalStrength); 
like image 168
vualoaithu Avatar answered Oct 04 '22 17:10

vualoaithu