Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6655525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:31:51+00:00 2026-05-26T01:31:51+00:00

Is there a way to discover whether the current connection is 3G, Edge or

  • 0

Is there a way to discover whether the current connection is 3G, Edge or WiFi, and receive a notification of this? Or just a way do discover whether the connection is WiFi?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:31:51+00:00Added an answer on May 26, 2026 at 1:31 am

    You should use Apple’s Reachability class

    http://developer.apple.com/library/ios/#samplecode/Reachability/Listings/Classes_Reachability_h.html

    after implementation you can use this in the delegate:

    - (void) configureTextField:  (Reachability*) curReach
    {
        NetworkStatus netStatus = [curReach currentReachabilityStatus];
        BOOL connectionRequired= [curReach connectionRequired];
        NSString* statusString= @"non";
        switch (netStatus)
        {
            case NotReachable:
            {
                statusString = @"Access Not Available";
    
                //Minor interface detail- connectionRequired may return yes, even when the host is unreachable.  We cover that up here...
                connectionRequired= NO;  
                break;
            }
    
            case ReachableViaWWAN:
            {
                statusString = @"Reachable WWAN";
    
    
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Cellular Data Detected" message:@"You are using Cellular data such as 3G or Edge. Downloading large amount of data may effect your cellular internet package costs. To avoid such extra cost kindly use Wifi." 
                                                               delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
                [alert show];
                [alert release];
    
    
                break;
            }
            case ReachableViaWiFi:
            {
                statusString= @"Reachable WiFi";
    
                break;
            }
        }
        if(connectionRequired)
        {
            statusString= [NSString stringWithFormat: @"%@, Connection Required", statusString];
        }
        NSLog(@"Network= %@",statusString);
        if ([statusString isEqualToString:@"Access Not Available"]){
            UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Internet Connection" message:@"It seems you are not connected to the internet, the app will try to load from the last cached data - assuming this data exist." 
                                                           delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
            [alert show];
            [alert release];
        }
        //textField.text= statusString;
    }
    
    
    - (void) updateInterfaceWithReachability: (Reachability*) curReach
    {
        if(curReach == hostReach)
        {
            //[self configureTextField: remoteHostStatusField imageView: remoteHostIcon reachability: curReach];
           // NetworkStatus netStatus = [curReach currentReachabilityStatus];
           // BOOL connectionRequired= [curReach connectionRequired];
    
            [self configureTextField:curReach];
    
        }   
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way for an HTML5 web-app to discover the connection-type on the
Is there way to set @include mixin(); to variable? I tried this @mixin bg-gradient($fallback,
Please help me to discover whether this is a bug in Python (2.6.5), in
Is there any way to discover what charset encoding a file is using?
Is there a way to discover all song files on the device? I basically
is there a way to discover which category my screen belong? I want to
Is there a way I can dynamically discover if a partition with a specific
Given an ActionScript Function object, is there any way to determine whether that function
Is there a way to discover what thread currently owns a lock? Specifically I
Is there a way to discover other iPhones in the range of it's wireless

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.