Because the memory of cell phone is very limited, so when you are operating a bitmap it will take too much resource, it is no perfect way to avoid, the only thing you can do is to optimize it, like more bigger sample size, maybe options.inSampleSize = 10, or adjust the value of height and width, then remember to release memory in time. *
* 2010/6/16 pawan nimje <[email protected]> > Hi all, > > in my application i have a functionality where a user can take photo and > poet it to a web server or select a photo from galerry and upload. > > So initially i used to get below exception for the very* first time* i > used to select a photo: > > Android: OutofMemoryError: bitmap size exceeds VM budget . > > then i used: > > *options.inSampleSize = 2;* > > Now the problem is im still getting the same exception ... *the only > difference is im getting exception after 2-3 times.* > > i.e im able to upload 2-3 (one by one) photos and then i get the exception > > any suggestions ??? > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Best Regards Haric -- 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

