question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PermissionsAndroid.getPermissions immediately resolves to "never_ask_again" when asking for geolocation permissions

See original GitHub issue

Environment

React Native Environment Info: System: OS: macOS 10.14.2 CPU: (8) x64 Intel® Core™ i7-4850HQ CPU @ 2.30GHz Memory: 1.45 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.14.2 - /usr/local/bin/node Yarn: 1.12.3 - /usr/local/bin/yarn npm: 6.4.1 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 Android SDK: API Levels: 27, 28 Build Tools: 27.0.3, 28.0.3 System Images: android-27 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.2 AI-181.5540.7.32.5056338 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: react: 16.6.1 => 16.6.1 react-native: 0.57.7 => 0.57.7 npmGlobalPackages: react-native-cli: 2.0.1

Description

Asking permission for geolocation for Android resolves to “never_ask_again” even before prompting the request permission dialog when asking for geolocation service permissions.

Reproducible Demo

import {PermissionsAndroid} from "react-native"; const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION); alert (granted);

If you run this code, in an app, You’ll see the alert with the text “never_ask_again” before prompting the user for permission.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
german970814commented, Apr 26, 2019

Same issue v0.59.4 with “ACCESS_FINE_LOCATION”

0reactions
stale[bot]commented, Oct 9, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting never_ask_again by default on react native when I ask ...
This is the function that asks for permission and it logs to the ... const granted = await PermissionsAndroid.request( PermissionsAndroid.
Read more >
PermissionsAndroid - React Native
Prompts the user to enable a permission and returns a promise resolving to a string value (see result strings above) indicating whether the...
Read more >
Request location permissions - Android Developers
This workflow follows the best practice of asking for runtime permissions in context, as described in the guide that explains how to request...
Read more >
Ask Run Time Android Permission using React Native ...
How to ask run time Android permission for Camera, access of external storage, phone call etc using React Native PermissionsAndroid?
Read more >
Managing app permissions in React Native - LogRocket Blog
Learn how to ask your users for permission to record and capture ... not be able to directly access the user's camera, microphone,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found