Use getSettingsClient instead of SettingsApi (deprecated)
Use the new api method to check if GPS is enabled or not.
Task<LocationSettingsResponse> result = LocationServices
.getSettingsClient(getCurrentActivity()) // use this method
.checkLocationSettings(builder.build());
Use getSettingsClient instead of SettingsApi (deprecated)
Use the new api method to check if GPS is enabled or not.