Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Uri selectedImage = data.getData();
- System.out.println(selectedImage);
- String[] filePath = { MediaStore.Images.Media.DATA };
- Cursor c = getContentResolver().query(selectedImage, filePath,
- null, null, null);
- c.moveToFirst();
- int columnIndex = c.getColumnIndex(filePath[0]);
- String picturePath = c.getString(columnIndex);
- System.out.println(picturePath);
- c.close();
- // getContentResolver().notifyChange(selectedImage, null);
- Bitmap reducedSizeBitmap = getBitmap(picturePath);
- Log.d("PHOTO", "TEST");
- if(reducedSizeBitmap != null){
- Log.d("PHOTO", "TEST");
- Bitmap photo_l = reducedSizeBitmap;
- System.out.println(photo_l.getWidth());
- System.out.println(photo_l.getHeight());
- photo[numberOfphotos] = photo_l;
- imageView.setImageBitmap(photo_l);
- numberOfphotos++;
- if (numberOfphotos > 1) {
- btNext.setEnabled(true);
- }
- }else{
- Toast.makeText(this,"Error while capturing Image ",Toast.LENGTH_LONG).show();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement