Location is not enabled yet, and when the popup opens I click No Thanks which should go in the catch statement as per the documentation. But, it is still going in then statement and printing enabled in the console.
I have attached a screenshot of the code and console is also visible.
Which version of ReactNative ?
More details on Device ?
Why do you return a new Promise ? The function promptForEnableLocationIfNeeded already returns a promise.
Location is not enabled yet, and when the popup opens I click No Thanks which should go in the
catch
statement as per the documentation. But, it is still going inthen
statement and printingenabled
in the console.I have attached a screenshot of the code and console is also visible.