0

I want to browse files and select any one . I am using following code

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("file/*");
startActivityForResult(intent, FILE_SELECTED);

This code shows list of file explorer applications on the device along with google drive and dropbox, but I dont want to show google drive and dropbox. How to filter google drive and dropbox ?

Prabhu M
  • 3,534
  • 8
  • 48
  • 87
  • Did you look that - http://stackoverflow.com/questions/12247082/how-to-remove-facebook-skype-and-unnecessary-option-from-email-chooser-on-androi ? – Sergey Shustikov Jul 03 '14 at 12:43

1 Answers1

0

The only way to display only the apps that you want is to create a custom dialog.

However, I suggest you reconsider this functionality:

  1. There is no way for you to filter all the apps that you don't want. There are many different cloud storage client apps and while you can filter some, you will still have others on the list.

  2. Android was built on a philosophy to let the user decide what they want to do.

If your app is not able to handle the remote files, you can just warn/notify the user when the selected file is not local.

swbandit
  • 1,986
  • 1
  • 26
  • 37