HT1695 How to check for an active Internet Connection on iPhone SDK?

Hi,
My name is John and i am working as a website designer at a leading website design company. I have iPhone 4 and
I would like to check to see if I have an Internet connection on the iPhone using the Cocoa Touch libraries.
I came up with a way to do this using an NSUrl. The way I did it seems a bit unreliable (because even Google could one day be down and relying on a 3rd party seems bad) and while I could check to see for a response from some other websites if Google didn't respond, it does seem wasteful and an unnecessary overhead on my application.
Is what I have done bad? (Not to mention 'stringWithContentsOfURL' is deprecated in 3.0) And if so what is a better way to accomplish this?
Thanks in advance

Assuming you mean O2 UK have a look through these guides
http://www.apple.com/uk/support/iphone/
http://community.o2.co.uk/t5/Apple/Useful-Links-for-new-iphone-users/td-p/96266

Similar Messages

  • How to check for active internet connection in iOS device

    Hello All,
    Recently I've come to  know that there are some API's provided by Flex 4.6 in Flash Builder 4.6 which are not supported in iOS based devices like iPhone and iPad.
    You can check the list here - http://help.adobe.com/en_US/as3/iphone/WS789ea67d3e73a8b24b55b57a124b32b5b57-7fff.html
    Now I'm helpless because in my cross-platform app, I need consinuously active internet connection and if it is not available, I want to show errors.
    Can any one help me about this.
    Thanks for reading

    Hi,
    we can check indexs uisng T codes SE11 and DB02
    Useful to run the ABAP reports SAP_UPDATE_DBDIFF and SAP_INFOCUBE_INDEXES_REPAIR.
    relevent links:
    http://help.sap.com/saphelp_nw70/helpdata/en/80/1a6473e07211d2acb80000e829fbfe/content.htm
    Re: Checking Indexes using SE11 and DB02
    Regards,
    BBC
    Edited by: BBC Achari on Jul 4, 2010 6:23 PM
    Edited by: BBC Achari on Jul 4, 2010 6:25 PM

  • How to check for updates on SCM packages?

    Hey guys,
    I wondered for some time now how to check for updates on SCM packages, i.e. -git
    or -svn ones. Updates for binary packages are automatically updated by pacman,
    no problem there. Checking for updates on non-SCM packages from the AUR is
    easily done with one of the various helper tools available (personally, I use
    slurpy).
    However, SCM packages can change without their PKGBUILD changing, so I'm not
    notified that I should recompile and update them.
    Is there a "proper" way of doing this? Am I missing something?
    Thanks in advance!

    If your system is booting then u can say that your bootblks are installed.Usually BootBlks are present in 0 & 1 slice of UFS Filesystem
    /usr/platform/platform-name/lib/fs/ufs
    directory where ufs boot objects reside.
    An x86 FDISK partition for the Solaris software begins with a one-cylinder boot slice, which contains the partition boot program (pboot) in the first sector, the standard Solaris disk label and volume table of contents (VTOC) in the second and third sectors, and the bootblk program in the fourth and subsequent sectors. When the FDISK partition for the Solaris software is the active partition, the master boot program (mboot) reads the partition boot program in the first sector into memory and jumps to it. It in turn reads the bootblk program into memory and jumps to it. Regardless of the type of the active partition, if the drive contains multiple FDISK partitions, the user is given the opportunity to reboot another partition.

  • How to check for bootblk on Disk

    Does someone know how to check for bootblk on solaris disk.

    If your system is booting then u can say that your bootblks are installed.Usually BootBlks are present in 0 & 1 slice of UFS Filesystem
    /usr/platform/platform-name/lib/fs/ufs
    directory where ufs boot objects reside.
    An x86 FDISK partition for the Solaris software begins with a one-cylinder boot slice, which contains the partition boot program (pboot) in the first sector, the standard Solaris disk label and volume table of contents (VTOC) in the second and third sectors, and the bootblk program in the fourth and subsequent sectors. When the FDISK partition for the Solaris software is the active partition, the master boot program (mboot) reads the partition boot program in the first sector into memory and jumps to it. It in turn reads the bootblk program into memory and jumps to it. Regardless of the type of the active partition, if the drive contains multiple FDISK partitions, the user is given the opportunity to reboot another partition.

  • How to check for a function module with its description and functionality

    Hi all,
    How to check for a function module,with its description and its functionality,in detail how can I know the purpose of a particular function module,how to search for a function module which suits my requirement .

    Hi,
    You can search a FM of your requirement by putting in the Key words and searching for a FM. Like * KEYWORD * and then pressing F4.
    Say for example you need to search something regarding converstion.
    Search for * CONVERT * and press F4.
    If there is something specfic like converting date to something you can give
    DATE * CONVERT *
    OR
    CONVERT * DATE *  and press F4.
    Once you narrow down your search you will have a Function module documentation inside the Function module. Please note that all the FMs willl not have documentation.
    Regards,
    Pramod

  • Want to know how to check for new line character in text file

    Hi All,
    I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
    Thanks
    static int readandwriteFile(Logger logger,String filepath){
              BufferedWriter out = null;
              BufferedReader in = null;
              File fr = null;
              int get_count = 0;
              try     {
              if(new File(filepath).exists())
              fr= new File(filepath);
                        System.out.println("FileName: "+fr);
                   if(fr != null){
    in = new BufferedReader(new FileReader(fr));
                             String text = in.readLine();
                             if(text != null){
                             get_count = Integer.parseInt(text);
                             in.close();
                             else{
                                  get_count = 0;
         else{                    
    out = new BufferedWriter(new FileWriter(filepath));
         out.write("0");
                out.close();
                   }          //Reading of the row count file ended.
              catch(Exception e) {
                   e.printStackTrace();
              finally {
                   try{               if (in != null) {
                             in.close();
              if (out != null) {
                             out.close();
              catch(Exception e) {
                        e.printStackTrace();
              return get_count;
         }

    You are calling the readline() only once which means you are reading only the first line from the file...
    Use a loop (Do-While preferably)
    do{
    //your code
    }while(text == "")

  • How to check for the sub folder in the document library Is already Exist using CSOM?

    Hi,
    My requirement is to create the  folder and sub folder in SharePoint document library. If already exist leave it or create the new folder and the subfolder in the Document library using client side object model
    I able to check for the parent folder.
    But cant able to check the subfolder in the document library.
    How to check for  the sub folder in the document library?
    Here is the code for the folder
    IsFolder alredy Exist.
    private
    string IsFolderExist(string InputFolderName)
    string retStatus = false.ToString();
    try
    ClientContext context =
    new ClientContext(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryLink"]));
                context.Credentials =
    CredentialCache.DefaultCredentials;
    List list = context.Web.Lists.GetByTitle(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryName"]));
    FieldCollection fields = list.Fields;
    CamlQuery camlQueryForItem =
    new CamlQuery();
                camlQueryForItem.ViewXml =
    string.Format(@"<View  Scope='RecursiveAll'>
    <Query>
                                            <Where>
    <Eq>
    <FieldRef Name='FileDirRef'/>
    <Value Type='Text'>{0}</Value>
                                                </Eq>
    </Where>
    </Query>
                                </View>",
    @"/sites/test/hcl/"
    + InputFolderName);
                Microsoft.SharePoint.Client.ListItemCollection listItems = list.GetItems(camlQueryForItem);
                context.Load(listItems);
                context.ExecuteQuery();
    if (listItems.Count > 0)
                    retStatus =
    true.ToString();
    else
                    retStatus =
    false.ToString();
    catch (Exception ex)
                retStatus =
    "X02";
    return retStatus;
    thanks
    Sundhar 

    Hi Sundhar,
    According to your description, you might want to check the existence of sub folder in a folder of a library using Client Object Model.
    Please take the code demo below for a try, it will check whether there is sub folder in a given folder:
    public static void createSubFolder(string siteUrl, string libName, string folderServerRelativeUrl)
    ClientContext clientContext = new ClientContext(siteUrl);
    List list = clientContext.Web.Lists.GetByTitle(libName);
    CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXml =
    @"<View Scope='RecursiveAll'>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name='FSObjType' />
    <Value Type='Integer'>1</Value>
    </Eq>
    </Where>
    </Query>
    </View>";
    //camlQuery.FolderServerRelativeUrl = "/Lib1/folder1";
    camlQuery.FolderServerRelativeUrl = folderServerRelativeUrl;
    ListItemCollection items = list.GetItems(camlQuery);
    clientContext.Load(items);
    clientContext.ExecuteQuery();
    Console.WriteLine(items.Count);
    if (0 == items.Count)
    //create sub folder here
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to check for locks on a table inside a program?

    Hi Gurus,
    Kindly let me know how to check for a lock on a particular table inside a program.I know that we can see locks on table held by a user from transaction SM12 but my requirement is to check for lock on MARA/MARC/MARV if lock exist then bypass my code else do the code.
    Kindly suggest or give code to check for a lock on a particular table.
    Thanks in advance
    Sudipto

    FAQ.  Locked.

  • TS3297 Error message: 'Cant connect to the itunes store. An unknown error occured (-3212) please check you have an active internet connection and try again'. Help !

    Can someone help me please ? I was using itunes (downloading albums etc) just half an hour ago. I had a pop up asking me if i'd like to download the latest version of itunes, which i accepted. When the update had finshed downloading, i then restarted my computer, as i usually would. Tried to re access the itunes store, and received the following error message: 'Cant connect to the itunes store. An unknown error occurred (-3212) please check you have an active internet connection and try again.
    Needless to say, i have an active internet connection and cant see any reason why this would be happening, it has never happened before ?
    Any help would be appreciated.

    Do you have PeerBlock installed/    >  TS3297 Error message: 'Cant connect to the itunes store.

  • How to check for impacts due to upgrade

    We are plannining to upgrade from 4.7 to ECC6..How to check for impacts on FTP'S,shell scripts and RFC's etc due to the assesment..Please suggest

    Hi,
    FTP's and Shell scripts are OS dependant not SAP or Database dependant so there will be no change at all unless you upgrade OS too. RFC's are not afected as per guides, notes and my experience.
    I´m doing an upgrade from 4.6C to 6.0 with connections with at least 10 systems and none of them had an issue during tests
    Good luck

  • How to keep movies purchased on my IPad, for viewing without internet connection?

    How to keep movies purchased on my IPad, for viewing without internet connection?

    If they were bought from itunes, Once they are fully downloaded you can watch them without any internet. They play locally.

  • Could someone please explain how to check for flashback, to a beginner?

    Could someone please explain how to check for flashback, to a beginner?  Thanks.

    Install all of the available software updates.  If you have flashback it will be automatically removed.

  • E90 Maps w/o active internet connection

    With *Maps* installed on an E90, it seems impossible to find a location or to plan a route without an active internet connection.
    Is there a method to use Maps without active internet connection (like Route66 on my notebook)?
    Thanks!
    Andreas

    Hi kaon,
    I checked the E90 manual online .. was curious ..
    Found out that it can be done !
    Page 54:
    To prevent the device from automatically downloading maps through the internet, for example, when you are outside your
    home cellular network, select Options > Settings > Network > Use network > Off.
    28-Jul-200711:39 PM
    kaon wrote:
    And even if there is Internet connection via wifi and telco's data service, Maps doesn't seem to see it.
    For the N95, if you select to set the Network to 'when need', then the phone will give you a chance to select the access point. Try selecting the right one -- WLAN/ Telco.
    Let me know how it goes !
    28-Jul-200711:39 PM
    kaon wrote:
    And is there a way to tell maps to never show the zooom-in start up animation?
    Hmm.. dont know..
    Cheers
    Let me be a ripple in the silent stream of your memory ~ Viveca

  • Do I have to have an active internet connection while using Audition

    Do I have to have an active internet connection while using Audition?  Sometimes I will want to take it on my laptop to places where I will be unable to get an internet connection.  Will the program still work in such cases?

    As long as you aren't using the Cloud for audio file storage, yes it will. I believe that it may occasionally need to "phone home" to check your credentials if you are using a CC version but only about once a month. It should warn you though I think but providing you have been using it at home in the days before you are away from the internet it should be OK.

  • How do I turn off my internet connection via 3G and be connected only to Wifi and vise vera? Iphone 4s

    How do I turn off my internet connection via 3G and be connected only to Wifi and vise vera? Iphone 4s

    Kappy wrote:
    The menubar for the Finder and your Desktop along with the date, time, and Spotlight icons. Looks like this:
    If it isn't present then open Network preferences, select the Airport port, check the box labeled: "Show Wi-Fi status in menubar." You can also turn Airport off in this same place.
    This is the iPhone forums

Maybe you are looking for

  • Printing Problems w Acrobat Pro 9

    Hi all, I really need your HELP! Here is the problem: When printing a PDF in Acrobat I'll only get out a part of the original site! This part is sitting in the upper half and centre of the paper - just a rectangle of 5x8 cm... but it shows the left u

  • Can't see any device after i attempt an upgrade and device useless til i reset on another pc.... Help!

    Everytime I try to do an upgrade via my PC it freezes the phone (screen set on pic of usb requesting to plug into itunes) and itunes fails to recognise device.  This has happened with my iphone 3s, my ipad, my ipod shuffle, and now with my brand new

  • Managing / Deleting Content - without losing it as well

    I need to start managing my iTunes content better, simply to conserve space on my pc.  My iTunes library is around 90GB today.  I've purchased some TV shows for my daughter to watch on our two iPods, two iPads and iPhone.  Those TV shows are currentl

  • Patch 124847-03 Trusted Solaris 8

    I am attempting to apply this patch to Trusted Solaris 8. I receive the following message after trying to do a patchadd Checking installed patches... One or more patch packages included in 124847-03 are not installed on this system. There are no requ

  • Svrmgrl problem. illegal redo buffer size

    Hello experts, I installed oracle 8.1.5 in Linux 6.1 successfully. And I rebooted the computer and got into the svrmgrl to start the db. I can connect using "connect internal" But I cannot start the db using "startup;" I get this error message, ORA-0