Is it possible to hide google drive while using Intent.ACTION_GET_CONTENT in android?

970 Views Asked by At

I have tried to open a file manager with mentioned code but I don't want to visible google drive option in the navigation bar.

I have tried the different solution but still, I didn't get my solution and wondering Is it possible or not?

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);
intent.setType("*/*");
startActivityForResult(Intent.createChooser(intent, "Select a File 
to Upload"),FILE_SELECT_CODE);
1

There are 1 best solutions below

0
On

Is it possible or not?

There is no documented and supported means for doing this. There could be dozens of apps all supporting ACTION_GET_CONTENT/ACTION_OPEN_DOCUMENT. Whether Google Drive is among them is largely up to the user.

EXTRA_LOCAL_ONLY may limit the number of contributing apps, but cloud storage providers (like Google Drive) may have locally-cached documents that they still make available even for "local-only" requests.