-
Notifications
You must be signed in to change notification settings - Fork 24.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] onRequestPermissionsResult prevents registerForActivityResult callback #42403
Labels
Platform: Android
Android applications.
Resolution: Fixed
A PR that fixes this issue has been merged.
Comments
Nope there is no particular reason. Thanks for sending over #42478 |
blakef
pushed a commit
that referenced
this issue
Jan 25, 2024
Summary: This change allows activities to handle onRequestPermissionsResult callbacks (eg: registerForActivityResult) Fixes #42403 [Android][Changed] - Call super.onRequestPermissionsResult in ReactActivity's onRequestPermissionsResult() Pull Request resolved: #42478 Test Plan: **Without super.onRequestPermissionsResult() call**  **With super.onRequestPermissionsResult() call**  Reviewed By: cipolleschi Differential Revision: D52952198 Pulled By: cortinico fbshipit-source-id: 53b5dac65f6b5409d87b5fe7f8be659d7b48f70d
lunaleaps
pushed a commit
that referenced
this issue
Feb 16, 2024
Summary: This change allows activities to handle onRequestPermissionsResult callbacks (eg: registerForActivityResult) Fixes #42403 [Android][Changed] - Call super.onRequestPermissionsResult in ReactActivity's onRequestPermissionsResult() Pull Request resolved: #42478 Test Plan: **Without super.onRequestPermissionsResult() call**  **With super.onRequestPermissionsResult() call**  Reviewed By: cipolleschi Differential Revision: D52952198 Pulled By: cortinico fbshipit-source-id: 53b5dac65f6b5409d87b5fe7f8be659d7b48f70d
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Platform: Android
Android applications.
Resolution: Fixed
A PR that fixes this issue has been merged.
Description
Hello,
I'm currently trying to implement health connect on Android 14 but I've found out that registerForActivityResult is never calling its callback since onRequestPermissionsResult
Is there a reason why
doesn't call
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
?After adding it to onRequestPermissionsResult, everything works as expected.
I've tried creating a patch adding this line and everything works as intended (https://github.com/LimAlbert/react-native-health-connect-android14)
Steps to reproduce
React Native Version
0.73.2
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/LimAlbert/reproonrequestpermissionsresult
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: