Reputation: 55
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);
Upvotes: 1
Views: 993
Reputation: 1007369
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.
Upvotes: 1