-1

This function open camera but takes only one images and setImage , i want to take 3 images from camera 'Capture' and show below and send its bitmap into server folder. This function open camera but takes only one images and setImage , i want to take 3 images from camera 'Capture' and show below and send its bitmap into server folder. This function open camera but takes only one images and setImage , i want to take 3 images from camera 'Capture' and show below and send its bitmap into server folder. This function open camera but takes only one images and setImage , i want to take 3 images from camera 'Capture' and show below and send its bitmap into server folder.

  private void takePhotoFromCamera() {
                    Intent intent = new Intent( 
                      MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
                    startActivityForResult(intent, CAMERA);
                }

// this is function used to get intent from camera.

      public void onActivityResult(int requestCode, int resultCode, Intent data) {

                super.onActivityResult(requestCode, resultCode, data);
                if (resultCode == this.RESULT_CANCELED) {
                    return;
                }
             if (requestCode == CAMERA) {
                 Bundle extras = data.getExtras();
                    FixBitmap1 = (Bitmap) extras.get("data");


        img.setImageBitmap(FixBitmap1);
        }

// This function used to send bitmap encode url into server folder.

         public void UploadImageToServer() {

                FixBitmap1.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream1);
                byteArray1 = byteArrayOutputStream1.toByteArray();
               String ConvertImage1 = Base64.encodeToString(byteArray1, Base64.DEFAULT);
      String ConvertImage2 = Base64.encodeToString(byteArray1, Base64.DEFAULT);
      String ConvertImage3 = Base64.encodeToString(byteArray1, Base64.DEFAULT);
        params.put("Val",ConvertImage1);
     params.put("Val",ConvertImage2);
     params.put("Val",ConvertImage3);
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Kamran Ijaz
  • 27
  • 2
  • 6
  • You need to capture one by one Otherewise create your own Camera Activity. – ADM Jul 06 '18 at 11:07
  • Possible duplicate of [Fastest Way to Upload Multiple Image to Server in android](https://stackoverflow.com/questions/32311484/fastest-way-to-upload-multiple-image-to-server-in-android) – Brijesh Joshi Jul 06 '18 at 11:07
  • i am not opening any gallery or directory, i just open my camera in app and want to take three different images at a time , when three images are taken it will be display down. – Kamran Ijaz Jul 06 '18 at 11:10

1 Answers1

0

Try this library. It might be useful for you

Chethan Kumar
  • 185
  • 1
  • 12