facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.26k stars 24.35k forks source link

Deny button not working in Permission Request dialog box #41227

Closed arjupba closed 1 year ago

arjupba commented 1 year ago

Description

Deny button not working in Permission Request dialog box when trying to get background location permission. We need to go to application permission settings page to get gps fulltime access. It's redirecting to the same settings even if we're pressing the 'Deny' button in the dialog box.

React Native Version

0.68.2

Output of npx react-native info

System: OS: macOS 12.6.6 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 38.44 MB / 16.00 GB Shell: 5.2.2 - /usr/local/bin/bash Binaries: Node: 16.16.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 8.11.0 - /usr/local/bin/npm Watchman: Not Found Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1 Android SDK: Not Found IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9123335 Xcode: 14.1/14B47b - /usr/bin/xcodebuild Languages: Java: 17.0.5 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

  1. Create a react native application.
  2. Run this function - await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.ACCESS_BACKGROUND_LOCATION, { title: 'Background Location Permission/, message: "Some Message", buttonPositive: 'OK', buttonNegative: 'Deny', cancelable: true, }, )
  3. It will redirect to app info - permission settings page if you're pressing 'OK"
  4. The same will happen if you pressed the 'Deny' button.

Snack, screenshot, or link to a repository

WhatsApp Image 2023-10-28 at 9 39 05 PM

github-actions[bot] commented 1 year ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
github-actions[bot] commented 1 year ago
:warning: Add or Reformat Version Info
:information_source: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2
cipolleschi commented 1 year ago

Hi @arjupba, thanks for the issue. We do not support RN 0.68 anymore. Please update to one of the supported versions and try again.

github-actions[bot] commented 1 year ago
:warning: Unsupported Version of React Native
:information_source: It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.