ChecklocationSettings alway false , Cannot call google dialog location
ult3mate opened this issue · 3 comments
ult3mate commented
checkLocationSettings alway false
provider = new LocationGooglePlayServicesProvider();
provider.setCheckLocationSettings(true);
please fix this.
Ornolfr commented
SmartLocation
.with(this)
.location(LocationGooglePlayServicesProvider().apply { setCheckLocationSettings(true) })
.start { }
This should show the dialog. Unfortunately, the location is not fetched after user accepted it.
shantanu1227 commented
This will also show the dialog
provider = new LocationGooglePlayServicesProvider(); provider.setLocationSettingsAlwaysShow(true); provider.setCheckLocationSettings(true); provider.init(this, LoggerFactory.buildLogger(true)); provider.start(location -> { provider.stop(); }, LocationParams.NAVIGATION, true);
MHKalantarian commented
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (provider != null)
provider.onActivityResult(requestCode, resultCode, data);
}
Add this to your code if you want to fetch location after user accepted. @Ornolfr