diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/location/LocationModule.java b/ReactAndroid/src/main/java/com/facebook/react/modules/location/LocationModule.java index ea0ed5a5c..866309241 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/location/LocationModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/location/LocationModule.java @@ -123,7 +123,7 @@ public class LocationModule extends ReactContextBaseJavaModule { (LocationManager) getReactApplicationContext().getSystemService(Context.LOCATION_SERVICE); String provider = getValidProvider(locationManager, locationOptions.highAccuracy); if (provider == null) { - error.invoke("No available location provider."); + emitError(PositionError.PERMISSION_DENIED, "No location provider available."); return; } Location location = locationManager.getLastKnownLocation(provider);