Muhammad Irfan
Muhammad Irfan

Reputation: 1457

How can I browse internal and external storage (sdcard) of android by clicking on photo?

I have this scenerio

http://www.cubixshade.com/images/test_photo.jpg

Open above url and I want an interface when photo box is clicked to browse sdcard images ?

does android sdk provide any component which browse image from sd card and show in android appplication ?

Upvotes: 0

Views: 1864

Answers (2)

Paresh Mayani
Paresh Mayani

Reputation: 128428

Yes there are 2 scenario to pick image from SD-card images.

  1. Open native gallery and pick image from it (Check this answer)
  2. User-defined gallery by defining custom adapter for your ListView/GridView, pick image from it (check this example: Android – Select multiple photos from Gallery)

Upvotes: 2

Md Abdul Gafur
Md Abdul Gafur

Reputation: 6201

Here is the pseudo-code:

String pathToSdCard = Environment.getExternalStorageDirectory().getAbsolutePath();
new File(pathToSdCard ).list();

and also Check the link

Thanks

Upvotes: 1

Related Questions