Quantcast
Viewing all articles
Browse latest Browse all 10

Check Internet Connection in iOS7 with Phonegap 3.3

Image may be NSFW.
Clik here to view.
check_internet_connection_phoengap_ios7

iOS7 One of the biggest release of Apple store with complete new concept of flat design and line icons.So also development is also changes as per new OS.So in Latest phonegap we have find one issue is that internet connection is available or not that code is not working in iOS7.So In this post we have add that code for how to test internet (Mobile network or WiFi) is available or not.

Recommended Reading:iOS 7 status bar overlap on header in phonegap

Step 1 : First of all install plugin for device info and network info. and check wither this code is added in config.xml or not if not then add this code

 <feature name="Device">
        <param name="ios-package" value="CDVDevice" />
    </feature>

Step 2 : simple code for check internet connection is below

 function checkConnection()                        /* Function Check Internet Connection */
{
       var connectionStatus = navigator.onLine ? 'online' : 'offline';
       alert(connectionStatus);       
}

I hope this tutorial is helpful.If you like this post or helpful then please like us or subscribe withus for get more update.

The post Check Internet Connection in iOS7 with Phonegap 3.3 appeared first on Excellent Web World.


Viewing all articles
Browse latest Browse all 10

Trending Articles