I have two classes. i want to pass array of image paths from activity to another activity. How can i do that.These images are stored in sdcard. I am able to retrieve the single image in the form of inputstream and convert that into bytearray and passing to another activity through an intent. But how can i do that for array of images.
Please see the code i used for converting from inputstream to bytearray.
istr = getExpansionFile().getInputStream("data/image1.png");
Bitmap bitmap = BitmapFactory.decodeStream(istr);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
byte[] byteArray = stream.toByteArray();
intent.putExtra("image",byteArray);
startActivity(intent);