A ReactNative module to check Bluetooth and Location status on Android and iOS
rootProject
SDK versionsisLocationEnabled()
has been renamed to areLocationServicesEnabled()
enableBluetooth()
and enableLocation()
methodsisLocationPermissionGranted()
checks for Location permission.Location permission states are:
When in use
state.Settings
to enable location or bluetooth prevents app rejection by Apple.isLocationEnabled
on iOS
now checks for Location Services
status instead of checking App permissions (Fix #3)enableLocation
now opens Location Services
page in case they are disabled, in case location permissions have been asked before the current app settings page is shown, if permission have yet to be asked to the user the promise will be rejected.On iOS 11, an app cannot open a specific Settings page, so calling enableLocation
when the Location Services
are not enabled will only open the Settings app on the main screen, so will also do the enableBluetooth
method.
Keep track of this issue at #4 .
enableLocation
now works on iOS
enableBluetooth
now works on iOS
true
as state)