1

I have tried to modify on able to select multiple photo in album but the result just allowed me to select single photo. And I want to know that is it possible to store the selected multiple photo into Bitmap array so that I can call a function like save Image with using the bitmap array. Please help me. Thanks.

case R.id.bupload:
            Intent pics=new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
            pics.setType("image/*");
            pics.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
            startActivityForResult(pics,RESULT_LOADS_IMAGE);
            break;

protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode==RESULT_LOADS_IMAGE && resultCode==RESULT_OK && null!=data)
    {
        Uri selectedImage=data.getData();
        String[] filePathColumn = {MediaStore.Images.Media.DATA};
        Cursor cursor=getContentResolver().query(selectedImage, filePathColumn, null, null, null);
        cursor.moveToFirst();
        int columnIndex=cursor.getColumnIndex(filePathColumn[0]);
        String picturePath=cursor.getString(columnIndex);
        cursor.close();
        Bitmap myselectedImage=BitmapFactory.decodeFile(picturePath);
        wphoto.setImageBitmap(myselectedImage);
    }
} 
  • 1
    http://stackoverflow.com/questions/23426113/how-to-select-multiple-images-from-gallery-in-android check with accepted answer – Jhaman Das Apr 27 '16 at 12:51

0 Answers0