I have tried this code. where is the wrong?
In 1st activity:
Cursor cursor = dbhelper.getdata(Adapter.KEY_RID, _id);
Intent intent = new Intent(this, SecondActivity.class);
intent.putExtra("image",getImage(d.getBlob(d.getColumnIndex(DbAdapter.KEY_IMG))));
//intent.putExtra("image",d.getBlob(d.getColumnIndex(DbAdapter.KEY_IMG)));
in second activity:
ImageView iv = (ImageView) findViewById(R.id.img);
iv.setImageBitmap(getIntent().getStringExtra("image"));
//iv.setImageBitmap(getImage(getIntent().getStringExtra("image")));
and get Image:
public static Bitmap getImage(byte[] image) {
return BitmapFactory.decodeByteArray(image, 0, image.length);
}