--------------------Activity A----------------------------

else if (requestCode == BasicInfo.PICK_FROM_ALBUM){
try{
mImageCaptureUri = data.getData(); //앨범의 이미지를 불러옴
File picture = getImageFile(mImageCaptureUri);
filePath = picture.getPath();
photo = BitmapFactory.decodeFile(filePath); //photo는 Imageview입니다.
photoimg.setImageBitmap(photo); //photo에는 이미지가 잘 들어갑니다.


Intent intent = new Intent();

ByteArrayOutputStream bs = new ByteArrayOutputStream(); //bytearraystreem
photo.compress(Bitmap.CompressFormat.PNG, 50, bs); // photo(ImageView)에 담긴 이미지를 컴프레스

byte[] baa = bs.toByteArray(); //
intent.putExtra("byteArray", bs.toByteArray()); //Activity B로 넘김


setResult(RESULT_OK,intent);
}
catch(Exception e){
finish();
}
}

----------------------------Activity B--------------------------------

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

if(requestCode == BasicInfo.WRITE){ //글쓰기(ActivityA)

if(resultCode == RESULT_OK){

if(getIntent().hasExtra("byteArray")) {

Bitmap btm = BitmapFactory.decodeByteArray(getIntent().getByteArrayExtra("byteArray")

,0,getIntent().getByteArrayExtra("byteArray").length); //btm에 값을 담고

String writemsg = data.getStringExtra("Write");

arrData.add(new Listview_data(R.drawable.asd, btm, writemsg));
//Listview_data(int, bitmap, string) 입니다 ㅡ ImageView, ImageView, TextView

timeline_adapter.notifyDataSetChanged();

}

}

}

}

 

검색해봤더니 비트맵이미지 그대로는 인텐트에서 인자로 받을수가 없기때문에

스트림형태로 bytearray에 담아서 다른 액티비티에 넘겨야 한다고 들었습니다

앨범에서 불러온 사진이 Activity A의 photo(ImageView)에는 잘 표시가 되는데요

Activity B로 넘기면 오류는 안나는데 않는데 값이 넘어가질 않네요

다른 값들은 Activity B의 리스트뷰에 잘 표시되는데 사진만 아무리해도 추가가 안됩니다

어떻게해야할지 모르겠네요 아니면 방법이 잘못된건가요? 다른 방법도있는건지..

답변 부탁드리겠습니다!