I did an application that create an image file copied from external memory with follow code:
Bitmap bitmap = Media.getBitmap(getContentResolver(), uri);
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
boolean besito=bitmap.compress(Bitmap.CompressFormat.JPEG, 90, bytes);
String sPath=uri.getPath();
String sNum=sPath.substring(sPath.lastIndexOf("/")+1);
String sFileName =sNum+".jpg";
deleteFile(sFileName);
FileOutputStream fos = openFileOutput(sFileName, MODE_WORLD_WRITEABLE);
fos.write(bytes.toByteArray());
fos.close();
that code save the to internal memory area application and work. Now I 've a problem on BitmapFactory.decodeFile when I try to reload this file, BitmapFactory.decodeFile return null:
ImageView img= (ImageView) findViewById(R.id.imgThumb);
Bitmap bm = BitmapFactory.decodeFile(sFileName);
BitmapDrawable drawable = new BitmapDrawable(bitmap);
img.setImageDrawable(drawable);
somebody can help to understand why BitmapFactory.decodeFile return null ?
thanks



