0

I have implemented the multipleimage uploading.If i select three value means,all three images are converted into byte[] perfectly but last value only send into server.How to send all three images.I have tried like this

 int i=0;
            for ( i = 0; i < ImgData.size(); i++) {
                Log.d("ImgData(i)--", String.valueOf(ImgData.get(i)));
                mImageIds = new ArrayList<String>();
                Bitmap bitmap = decodeFile(ImgData.get(i));

                String image = getStringImage(bitmap);
                mImageIds.add(image);
                Log.d("Image--", image);

                ByteArrayOutputStream stream = new ByteArrayOutputStream();
                bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
                byte[] byteArray;
                byteArray = stream.toByteArray();
                Log.d("byteArray11--", String.valueOf(byteArray));
              //  ByteArrayBody byteArrayBody = new ByteArrayBody(byteData, "image");
                entity.addPart("room_images", new ByteArrayBody(byteArray,
                        "image/jpeg"));
                // Add a bitmap


        }
sri
  • 105
  • 9
  • Instead of opening a new post you could have stayed at your former of today and put that code there. Its also not nice that you did not react on my code there. Not answered my questions. http://stackoverflow.com/questions/39240763/issue-in-multiple-image-sending-to-sever-in-android And you missed an importand clue in my code. – greenapps Aug 31 '16 at 18:48
  • How to send all images in loop @greenapps – sri Sep 01 '16 at 05:23

0 Answers0