tags:

views:

49

answers:

2

Hello,I would like to show the phone's photo gallery and when the user selects an image then notify my application on the image selected so I can get that images informations.

is that possible and how?

thanks in advanced maxsap.

+1  A: 

See if the answer in this thread helps: How to get the images from device in Android application

Samuh
thanks a lot that was what I was looking for.
maxsap
you're welcome!
Samuh
one problem here,how can I get the absolute path of the returned image? if I do :Uri chosenImageUri = data.getData();chosenImageUri.getData();I have an Uri but I want the string. any ideas?regards maxsap.
maxsap
ok found the solution to that problem too, its in this post http://stackoverflow.com/questions/3401579/android-get-filename-and-path-from-uri-from-mediastore
maxsap
A: 

hi,

u can get the absolute path of your image stored in the Gallery of your phone by

Environment.getExternalStorageDirectory();

here there are different options available. You can use DIRECTORY_PICTURES where all the images are stored in the SD Card.

now u can use this to get your directory file.

u can try this out it works for me

Rakesh Gondaliya
thanks but Samuh's answer was ok
maxsap