0

How to open My Files/File Manager folder in Android Programmatically (using intent) in Android 12 - Snow Cone? I am using the below code snippet which opens up the File Manager in Android 11(Red Velvet Cake), I want the My Files folder to get open programmatically in Android 12(Snow Cone), please let me know if there are any specific intent parameters I need to pass to get the File Manager open in Android 12.

        Intent chooserIntent;
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
            chooserIntent = new Intent(Intent.ACTION_PICK, 
            MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
            chooserIntent.setType("*/*"); 
        }else {
            chooserIntent = new Intent(Intent.ACTION_GET_CONTENT);
            chooserIntent.setType("*/*");
            chooserIntent.addCategory(Intent.CATEGORY_OPENABLE);
        }

Thanks :)

Shubham Vyas
  • 59
  • 1
  • 1
  • 10
  • Sorry but My Files/File Manager folder? Never heard of. Please mention full path to begin with. – blackapps Dec 17 '21 at 13:43
  • Can you tell which directories the user can pick on an Android 12 device? Even on an Android 11 device using ACTION_PICK? – blackapps Dec 17 '21 at 13:53
  • I think you confused us all. Just use ACTION_GET_CONTENT as ACTION_PICK is useless for picking from directories. – blackapps Dec 17 '21 at 13:55

0 Answers0