-
-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Describe the bug
hello
this is my java code to call the picker
launcher.launch(new DocumentFilePickerConfig());
private ActivityResultLauncher launcher = registerForActivityResult(
new ActivityResultContracts.StartActivityForResult(),
result -> {
if (result.getResultCode() == Activity.RESULT_OK) {
Uri uri = result.getData().getData();
// String filePath = result.getData().getStringExtra(Const.BundleExtras.FILE_PATH);
// Handle other scenarios (e.g., multiple picks) as needed
}
}
);
i have this error
com.nareshchocha.filepickerlibrary.models.DocumentFilePickerConfig cannot be cast to android.content.Intent
at androidx.activity.result.contract.ActivityResultContracts$StartActivityForResult.createIntent(ActivityResultContracts.kt:58)
at androidx.activity.ComponentActivity$activityResultRegistry$1.onLaunch(ComponentActivity.kt:176)
at androidx.activity.result.ActivityResultRegistry$register$2.launch(ActivityResultRegistry.kt:130)
at androidx.activity.result.ActivityResultLauncher.launch(ActivityResultLauncher.kt:37)
at fr.openmotion.secureangelmodel.gui.excel_import.ChooseAttachment.browseButton(ChooseAttachment.java:163)
Library Version
0.5.2
Steps to reproduce
No response