question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onRequestPermissionsResult is deprecated

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:6
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JeromeCHAcommented, May 12, 2021

So we need to suppress warning in the generated PermissionDispatcher files?

0reactions
blueiceheavencommented, Jun 6, 2021

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

onRequestPermissionsResult() is deprecated. Are there any ...
The onRequestPermissionsResult() method is deprecated in androidx.fragment.app.Fragment . So you may use registerForActivityResult() method ...
Read more >
Deprecated requestPermissions() - DeHaat
It returns three values first is an integer value which denotes the request code, second is an array of strings representing permissions, and ......
Read more >
onRequestPermissionResult deprecation issue #1388 - GitHub
onRequestPermissionResult is marked as deprecated in favor of onRequestPermissionsResult: ...
Read more >
ActivityCompat.OnRequestPermissionsResultCallback
On this page; Summary. Public functions. Public functions. onRequestPermissionsResult ... fun onRequestPermissionsResult( requestCode: Int,
Read more >
Fragment.OnRequestPermissionsResult(Int32, String ...
Obsolete("deprecated")] public virtual void OnRequestPermissionsResult (int requestCode, string[] permissions, Android.Content.PM.Permission[] grantResults) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found