-
-
Notifications
You must be signed in to change notification settings - Fork 840
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 11 Auto Revoke Feature Request #527
Comments
I think this is the most accurate API for the second link, as the first link requires permissions to call but this one may be called by the package for it's own status https://developer.android.com/reference/android/content/pm/PackageManager#isAutoRevokeWhitelisted() What's the possible implementation though? This isn't really a permission, it's just a status of the app, so it would be an API available to any caller I think from the base module, and then similar to openSettings API already existing you could code up an API that created an Intent using the information from your first link and called it with a response handler perhaps? |
Hi @Mattimus333, |
Nag is a strong word. It could definitely help remind the user that the app my not work as expected if they have this setting turned on. |
I responded quickly last time and am doing so again because this would be interesting for my app actually, and for exactly the reason you state. In general my app exposes these sorts of privacy tradeoffs to the user with tangible benefits (typically once - echoing @Mattimus333 with regard to "nag" or simply "mention") so it would be nice to have. It wouldn't be high on my priority list to code up vs my current priorities but I could be a good testing counterparty if it was acceptable and you wanted to give it a shot @Mattimus333 |
Sorry, english is not my first language. I didn't know it was that strong. As I read, the permissions are revoked after a few months without usage: https://developer.android.com/about/versions/11/privacy/permissions#auto-reset. As this library encourage the developer to request permissions at runtime and only when you need it, it shouldn't create any issue. I understand it might be valuable in some extremely rare cases, but a few months is a lot. I'm not sure it has to be a high priority feature to develop. |
Sooner or later I'm going to have to implement this feature myself for a project I'm working on so if you were interested I could include it in this library and hit you with a pull request, but if you don't think it fits in the scope of this library that is understandable. @zoontek Let me know what you think. @mikehardy Exactly what I'm thinking. If the user wants to enable this new setting, fine, but it is good to warn them what the effects might be! If I do give it a shot I'll let you know. A second set of eyes is always appreciated on the testing front. |
This is one that I think is almost react-native-device-info (I maintain that one right now) but since it is permission-related it seems like a better home here. One of the things that I do with RNDI @zoontek is just expose whatever API seems like a fit with the package that the device supports - a philosophy of "if there is a native API, I will expose it". Similar to the GPS case you never know what the app is doing and maybe it's the next cure for cancer or COVID contract tracing or something, what do I know :-) ? If the platforms themselves were going in the non-privacy direction I would feel more compelled to personally advocate but (feels weird to type this...) even Android right now is getting to be fairly protective by default and require an appropriate amount of user transparency (a great thing) As for the English as a second language thing, your English is of course great (of which you are likely aware) but I am always tuning my second language, so just for that purpose yes - "nag" is always a negative thing, like you have been asked the 5th time for something even though you answered the same each time. Of course many apps do nag, but ideally we here only code very respectful apps ;-). Cheers |
I'm looking to implement this feature for one of our projects. @zoontek Do you have any requirements / specifications on how you would like to see this implemented? |
@boazpoolman This API looks like a shitshow, so if you can abstract this to a boolean (and not |
Yep. That was what I was thinking as well. |
Feature request
Android 11 has a new feature that allows the user to enable a switch that will "auto revoke permissions" after a few months of no use. I believe there are ways to detect this and prompt the user to change it.
Why it is needed
Make full use of Android 11 features. Definitely not necessary but would be nice considering this library is "react-native-permissions"
Possible implementation
https://developer.android.com/reference/android/content/Intent#ACTION_AUTO_REVOKE_PERMISSIONS
https://developer.android.com/reference/android/content/pm/PackageManager#isAutoRevokeWhitelisted(java.lang.String)
Code sample
Upvote & Fund
The text was updated successfully, but these errors were encountered: