daily pastebin goal
5%
SHARE
TWEET

Untitled

a guest May 16th, 2018 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.                 Uri selectedImage = data.getData();
  3.             System.out.println(selectedImage);
  4.             String[] filePath = { MediaStore.Images.Media.DATA };
  5.             Cursor c = getContentResolver().query(selectedImage, filePath,
  6.                     null, null, null);
  7.             c.moveToFirst();
  8.             int columnIndex = c.getColumnIndex(filePath[0]);
  9.             String picturePath = c.getString(columnIndex);
  10.             System.out.println(picturePath);
  11.  
  12.             c.close();
  13.  
  14.               //  getContentResolver().notifyChange(selectedImage, null);
  15.                 Bitmap reducedSizeBitmap = getBitmap(picturePath);
  16.                 Log.d("PHOTO", "TEST");
  17.                 if(reducedSizeBitmap != null){
  18.                     Log.d("PHOTO", "TEST");
  19.  
  20.                     Bitmap photo_l = reducedSizeBitmap;
  21.                     System.out.println(photo_l.getWidth());
  22.                     System.out.println(photo_l.getHeight());
  23.  
  24.                     photo[numberOfphotos] = photo_l;
  25.                     imageView.setImageBitmap(photo_l);
  26.                     numberOfphotos++;
  27.                     if (numberOfphotos > 1) {
  28.                         btNext.setEnabled(true);
  29.                     }
  30.                 }else{
  31.                     Toast.makeText(this,"Error while capturing Image  ",Toast.LENGTH_LONG).show();
  32.                 }
  33.  
  34.  
  35.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top