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; }
thanks