Here i write how to access an image from Gallary in our application
here i paste the sample code for that
to start Gallary Activity from our application
Using java Syntax Highlighting
- Intent Gallaryintent = new Intent();
- Gallaryintent.setAction(Intent.ACTION_PICK);
- Gallaryintent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
- startActivityForResult(Gallaryintent, constants.ACT_IMAGEREQUESTCODE);
Parsed in 0.013 seconds, using GeSHi 1.0.8.4
here is code to get the image Uri from the Gallary
Using java Syntax Highlighting
- @Override
- protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- try {
- super.onActivityResult(requestCode, resultCode, data);
- if (resultCode != RESULT_OK) {
- return;
- }
- Uri uri = data.getData();
- Bitmap Myimage=MediaStore.Images.Media.getBitmap(mContext.getContentResolver(),uri);
- }}
Parsed in 0.010 seconds, using GeSHi 1.0.8.4
hope will help this .....
Cheers
Bins...
