Richou / react-native-android-location-enabler

Display a GoogleMap like android popup to ask for user to enable location services if disabled
MIT License
204 stars 51 forks source link

Use getSettingsClient #21

Closed Moumene closed 5 years ago

Moumene commented 5 years ago

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());
Richou commented 5 years ago

Thx for the PR, I've made changes and other cleaning code in addition.