-1

After upgrading my phone(Redmi 7a pie) to android 10 sometimes open with dialog appears when choosing a file with file chooser

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
if (intent.resolveActivity(getPackageManager()) != null) {
   startActivityForResult(Intent.createChooser(intent,null), 1);
}`

I have also tried with "ACTION_OPEN_DOCUMENT"

Do you have any idea how to fix this?

Thanks enter image description here

Edit: A solution from @Rinkal Patel with "ACTION_PICK" enter image description here Very limited

nimday
  • 333
  • 3
  • 9
  • I am not clear , would you please clear me . Do you want to add implicit intent receiver functionality to your app ? But its not listed your App on Android 10 "Open with" dialog? – Zahid Islam Aug 01 '21 at 06:05
  • @Zahid Islam,If you mean onActivityResult function,yes i have that – nimday Aug 01 '21 at 06:36

1 Answers1

-1
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
if (intent.resolveActivity(getPackageManager()) != null) {
    startActivityForResult(Intent.createChooser(intent,null), 1);
}
frankenapps
  • 5,800
  • 6
  • 28
  • 69
Rinkal Patel
  • 156
  • 3