-
Notifications
You must be signed in to change notification settings - Fork 425
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 doesn't seem to be updating when increasing permissions #2223
Comments
This comment was marked as resolved.
This comment was marked as resolved.
Android does not broadcast events when the user changes permissions in your App settings. |
How do I recognize changes? Just request the provider state each time I need it? |
yes |
Also, the |
I don't know what you mean. |
I can't read that at all, really blurry. Could maybe just paste as text in between triple-backticks so github continues to work well as a text medium ? |
|
Here's a video Screen.Recording.2024-12-04.at.3.08.00.PM.mov |
Google "Android BroadcastReceiver app permission change". There is no known https://stackoverflow.com/questions/32718933/broadcast-action-on-permission-change-in-android-m |
From that answer this was the thing that was most surprising to me when I first experienced it:
But as the answers say, it doesn't really matter. In practice all you can do is check permission every single time you go to use it, no way around it |
That makes sense but also makes me question why even use "onProviderChange" if on Android I need to I say this knowing there are other reasons for having that information but a listener for permissions seems like it should have that sort of capability. Or at least somewhere in the docs noting these things. Maybe I missed it. |
I think the thing that will trip people up is that the activity is terminated |
|
This is not a new issue. People have been asking about it for years. Android doesn’t feel it’s important to provide a BroadcastReceiver for this. |
For others who also run into this issue, I found utilizing |
Your Environment
react-native -v
): 0.74.5Expected Behavior
onProvider
subscription is called when a user updates their permissions.Actual Behavior
no log is sent until the app is killed and reloaded.
Steps to Reproduce
Code I'm using
Steps:
Context
Sending a user to update their permissions and listening for that change.
Debug logs
The text was updated successfully, but these errors were encountered: