PermissionsDispatcher
PermissionsDispatcher copied to clipboard
onRequestPermissionsResult is deprecated
FAQs
Overview
- onRequestPermissionsResult is deprecated
Expected
- use registerForActivityResult(ActivityResultContract, ActivityResultCallback) passing in a RequestMultiplePermissions object for the ActivityResultContract and handling the result in the callback.
Actual
- What is the actual behavior?
Environment
- Which library version are you using?
- On which devices do you observe the issue?
- Note any other information that might be useful
Reproducible steps
- While it's not required, it'd be perfect to add a link to a sample project where you encounter the issue
thx, this is something we've been thinking of.
Facing the same issue. It even caused infinite recursive.
It even caused infinite recursive.
what do you mean? I suppose it's not related to the issue 🤔
Hi, do you know when the deprecated methods will be support?
Facing warnings for this as well. We use Dagger version 2.33, which depends on newer Activity/Fragment APIs that deprecates onRequestPermissionsResult. Since onRequestPermissionsResult is used by permissiondispatcher generated code we are receiving warnings for this.
um...I know it's deprecated but I'm afraid we can't keep the current API with ActivityResultContract 🤔 Can anyone think of it?
In my understanding, the reason Google has deprecated onRequestPermissionsResult is just to induce us to use ActivityResultContract and I haven't been able to find an imminent reason to move on to ActivityResultContract to be honest. Maybe just suppressing the warning could be a temporal solution?
So we need to suppress warning in the generated PermissionDispatcher files?
For a quick fix that can be enough, but better if you use the expected solution from Yuki-r's comment: https://github.com/permissions-dispatcher/PermissionsDispatcher/issues/699#issue-750935141
So we need to suppress warning in the generated PermissionDispatcher files?
Will you do it?
@RustamSitdikov No, I don't really like to update generated code files. Instead, we have decided to remove PermissionDispatcher library and use ActivityResultContract with RequestMultiplePermissions.
@hotchemi Hi, I face the same problem of gradle report onRequestPermissionsResult is deprecated, do you have timeline or
quick solution to fix that? We do not want to change the generated code files.