0
imageView=(ImageView)findViewById(R.id.img);
String pathName = Environment.getExternalStorageDirectory().toString() + "/person.png";
Bitmap bmp = BitmapFactory.decodeFile(pathName);
imageView.setImageBitmap(bmp);
Pratik Butani
  • 60,504
  • 58
  • 273
  • 437

1 Answers1

0

Please see if your app has permission to read from external storage i.e. Manifest.permission.READ_EXTERNAL_STORAGE

String photoPath = Environment.getExternalStorageDirectory() + "/abc.jpg";
Bitmap bitmap1 = BitmapFactory.decodeFile(photoPath);
imageView.setImageBitmap(bitmap1 );
Alok Gupta
  • 1,353
  • 1
  • 13
  • 29