This code helps you to check whether the location service is available on your ANDROID Phone or not.
Copy this code and paste to your file.
Happy coding…..

 public boolean GPSAvailable() {
     LocationManager loc_manager = (LocationManager)
     getSystemService(Context.LOCATION_SERVICE);
     List<string> str = loc_manager.getProviders(true);

     if(str.size()>0)
         return true;
     else
         return false;
}
 

One Comment

  1. Shubham June 16, 2011 at 8:31 pm

    thanks

     

Leave a Reply

Your email address will not be published. Required fields are marked *

 

 

 

Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.