I am getting the outOfMemoryError,bitmap size exceeds the virtual machine
budget
i am doing the below
public void getBitmap1(String str)
{
InputStream is =null;
try {
URL myFileUrl =new URL(str);
HttpURLConnection conn= (HttpURLConnection)myFileUrl.openConnection();
conn.setDoInput(true);
conn.connect();
is = conn.getInputStream();
Bitmap orgImg = BitmapFactory.decodeStream(is);//this line it is throwing
exception
barcode_bitmap.add(orgImg);// barcode_bitmap is an arraylist of bitmap.
} catch (IOException e) {
e.printStackTrace();
}
finally{
if(is!=null)
{
try {
is.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
How to resolve this, it comes once in a while.
Please help,Thanks in advance:-)
--
Regards,
Vani Reddy
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en