When I am calling this function there is no image in image view
bitmapFactory.decodefile(filename) showing null .. please help for this.
Here is my cod
Bitmap bitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
This returns null, if
if the above two point are okay in your code, it means you are getting a null value because its taken time for android to render the image.
add a dummy imageviewer in your code to speed up the render process.
bm=BitmapFactory.decodeFile(dir.getAbsolutePath());
imgPassport.setImageBitmap(bm); // This imageviewer is not visible in my App
Also ensure you are not calling the method decodeFile(dir.getAbsolutePath()) from background thread