I try use this code for pick an image:
ActivityResultLauncher<PickVisualMediaRequest> pickMedia =
registerForActivityResult(new ActivityResultContracts.PickVisualMedia(), new ActivityResultCallback<Uri>() {
@Override
public void onActivityResult(Uri uri) {
if (uri != null) {
}
}
});
But this signature is absent, I can see it via source code of package androidx.activity.result
.
But Android Studio show as hint two other signature with additional parameters, I tried use them but fail too.
I use androidx.activity:activity:1.9.2
You need to sign in to view this answers