Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Plugin to Check if GPS enabled on Cordova iOS and Android apps

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 2.30k
    Comment on it

    Hello Readers,

    Cordova Geolocation API works when GPS enabled on device or we can say that it will not provide you the exact position. We can provide manual lat long with out enable GPS. Cordova Geolocation API doesn't provide a way to check GPS enabled or not.

     

    Now we have a plugin which checks GPS enable or not and we can notify user to enable the GPS.

    This plugin supports Android and iOS platform.

     

    To install the plugin we need to install the plugin through CLI :

    $ cordova plugin add https://github.com/fastrde/phonegap-checkGPS.git

    Now we can check GPS enabled or not.

     

    Example:

    CheckGPS.check(function(){
        alert("GPS is enabled!");
    
    },
    function(){
        alert("GPS is disabled!");
    });

    Plugin creates CheckGPS object with check method which checks the GPS settings on device.

     

    Hope this will help you :)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: