I\'m creating a simple app to take a picture. this is my code
Button b1; ImageView iv; String TAG = \"MAIN ACTIVITY\"; File photo; private Uri mImageUri;
Use BitmapFactory.decodeStream instead of BitmapFactory.decodeFile.
try ( InputStream is = new URL( file_url ).openStream() ) { Bitmap bitmap = BitmapFactory.decodeStream( is ); }
Source https://stackoverflow.com/a/28395036/5714364