Skip to content
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

In kotlin onActivityResult, This method has been deprecated #921

Open
chinhdl891 opened this issue Jul 12, 2024 · 1 comment
Open

In kotlin onActivityResult, This method has been deprecated #921

chinhdl891 opened this issue Jul 12, 2024 · 1 comment

Comments

@chinhdl891
Copy link

@deprecated("This method has been deprecated in favor of using the Activity Result API\n " +
" which brings increased type safety via an {@link ActivityResultContract} and the prebuilt\n" +
" contracts for common intents available in\n " +
" {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for\n " +
" testing, and allow receiving results in separate, testable classes independent from your\n " +
" activity. Use\n {@link #registerForActivityResult(ActivityResultContract, ActivityResultCallback)}\n " +
" with the appropriate {@link ActivityResultContract} and handling the result in the\n " +
" {@link ActivityResultCallback#onActivityResult(Object) callback}.")

@jens-muenker
Copy link

I made a fork which replaced it with an ActivityResultLauncher. In addition to the small updates, I translated most of the code to kotlin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants