In kotlin onActivityResult, This method has been deprecated
Opened this issue · 1 comments
@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}.")
I made a fork which replaced it with an ActivityResultLauncher. In addition to the small updates, I translated most of the code to kotlin.