0

I'm writing an android app.

Clicking on a button,

I want the user to choose a photo from a specific (predefined) folder.

I have read few answers to that:

ans1

but then: how will it work in case of an empty folder?

won't public void onScanCompleted(String path, Uri uri) open a specific file? which is allFiles[0] ?

and i'm not sure what is better for my need? Intent.ACTION_VIEW or Intent.ACTION_PICK

Community
  • 1
  • 1
Elad Benda
  • 35,076
  • 87
  • 265
  • 471
  • What do you mean by "open a folder"? If you have the path to the folder, why do you need to use an Intent? – NormR Sep 28 '13 at 23:54
  • Clicking on a button, I want the user to choose a photo from a specific (predefined) folder. – Elad Benda Sep 29 '13 at 21:44
  • If you have the path to the folder, the File class will give you a list of the files in the folder. That list could be presented to the user for his selection. – NormR Sep 30 '13 at 00:28
  • but I want the user to choose via native photo Gallery. not via text list I create – Elad Benda Sep 30 '13 at 11:30
  • Are you asking: What apps will display images in a given folder, allow a user to select one and return the path to the selected image? Given the app, what Intent will go to that app passing it the folder? – NormR Sep 30 '13 at 15:09
  • See this http://stackoverflow.com/questions/550905/access-pictures-from-pictures-app-in-my-android-app – NormR Sep 30 '13 at 19:29
  • i'm asking how to open a specific folder with Photo Gallery (ie. "screen shots" folder) – Elad Benda Oct 01 '13 at 08:38
  • Have you read the doc for the Photo Gallery app? Does it have notes for developers on how to use it? Did you read the link I posted earlier? – NormR Oct 01 '13 at 12:07

0 Answers0