BitmapFactory.decodeFile(String imagePath) returns null even image exists
问题 I don't know , why I am getting null from BitmapFactory.decodeFile(String imagePath) method. imagePath is perfect.Code is below here . public static byte[] imageToByteArray(String imagePath){ Bitmap bitmap = BitmapFactory.decodeFile(imagePath); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.JPEG , 100 , byteArrayOutputStream); return byteArrayOutputStream.toByteArray(); } imaagePath is a internet specific path .Here I am using