protected void onActivityResult(int requestCode, int resultCode, Intent data) {

super.onActivityResult(requestCode, resultCode, data);

if (resultCode != RESULT_OK) {

return;

} else if (requestCode == PICK_FROM_ALBUM && resultCode == RESULT_OK) {

try{

File path = new File("/sdcard/image/test");

if(!path.isDirectory())

{

path.mkdir();

}

Uri uri = data.getData();

bmp = Images.Media.getBitmap(getContentResolver(), uri);

String str = "/sdcard/image/test/test2.jpg";

SaveBitmap(bmp,str);

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}

}

private void SaveBitmap(Bitmap bitmap, String path)

{

File fileCache = new File(path);

OutputStream out = null;

try

{

fileCache.createNewFile();

out = new FileOutputStream(path);

bmp.compress(CompressFormat.JPEG, 100, out);

}catch(Exception e)

{

e.printStackTrace();

}

finally

{

try{

out.close();

}catch(IOException e)

{

e.printStackTrace();

}

}

}


1번파일에서 저렇게 이미지를 파일로 저장을합니다. 이클립스에서 저장하고 이미지파일로 제대로 열리는것 까지 확인했습니다.

다음 2번파일에서


imageV = (ImageView) findViewById(R.id.image_view);

bmp=BitmapFactory.decodeFile("/sdcard/image/test/test2.jpg");

imageV.setImageBitmap(bmp);


이렇게줘서 받아올려고하는데 어떻게 하면 될까요 정말 미치겠습니다...

이미지뷰가 열려야하는데 안열립니다....

부탁드립니다.