I have wrote a code for a button to let me move from an activity in my application to my main activity. But an error occurred during run :
07-21 09:28:13.864: E/dalvikvm-heap(371): 25165824-byte external allocation too large for this process. 07-21 09:28:13.864: E/GraphicsJNI(371): VM won't let us allocate 25165824 bytes
I have used an image and stored them in my database but without any recycle is this the problem? Here is my code in bitmap :
try {
Log.d("to get image", "ok");
ImageView imageView = (ImageView) rowView.findViewById(R.id.imageView1);
Bitmap bitmap = BitmapFactory.decodeStream((InputStream)new URL(imageInfo.get(position)).getContent());
imageView.setImageBitmap(bitmap);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
My app suppose to retrieve default images from youtube for any key search word and store them in my data base.