Just like the iPhone has a UIImagePickerController to let the user access pictures stored on the device, do we have a similar control in the Android SDK?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
startActivityForResult, passing in an Intent that describes an action you want completed and and data source to perform the action on.Luckily for you, Android includes an Action for picking things:
Intent.ACTION__PICKand a data source containing pictures:android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URIfor images on the local device orandroid.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URIfor images on the SD card.Call
startActivityForResultpassing in the pick action and the images you want the user to select from like this:Then override
onActivityResultto listen for the user having made a selection.Once you have the image Uri you can use it to access the image and do whatever you need to do with it.