List of usage examples for android.content Intent URI_ALLOW_UNSAFE
int URI_ALLOW_UNSAFE
To view the source code for android.content Intent URI_ALLOW_UNSAFE.
Click Source Link
From source file:MainActivity.java
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == PHOTO_RESULT && resultCode == RESULT_OK) { ImageView imageView = (ImageView) findViewById(R.id.imageView); imageView.setImageBitmap(BitmapFactory.decodeFile(mLastPhotoURI.getPath())); if (data != null) { imageView.setImageBitmap((Bitmap) data.getExtras().get("data")); try { imageView.setImageBitmap(MediaStore.Images.Media.getBitmap(getContentResolver(), Uri.parse(data.toUri(Intent.URI_ALLOW_UNSAFE)))); } catch (IOException e) { e.printStackTrace();/*from ww w.ja v a 2s . c o m*/ } } } }