java - how i send image from image view to next activity here this is the code where image shownn in image view -


//this code image previous activity

i = getintent(); getimage = i.getstringextra("uri");  bitmapfactory.options options = new bitmapfactory.options();  options.insamplesize = 6;  bitmap bitmap = bitmapfactory.decodefile(getimage, options);  log.e("arun", "arun" + bitmap);  imageview.setimagebitmap(bitmap); 

//now how send next activity show in imageview of next activity //in next activity have write

bitmap = (bitmap) intent.getparcelableextra("bitmapimage"); previewthumbnail.setimagebitmap(bitmap); 

//but error occur

use below code sending , receiving bitmap

for sending bitmap :

intent intent = new intent(this, newactivity.class); intent.putextra("bitmapimg", bitmap); 

for receiveing bitmap use getparcelableextra() method

intent intent = getintent();  bitmap bitmap = (bitmap) intent.getparcelableextra("bitmapimg"); 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -