I’m trying to find out the maximal image resolution for processing photos in my app.
The first version of it is already online, and I got several OutOfMemoryError exception reports already.
Is there a way to determine the available memory, or is there some other strategy to find the best solution (in fact the maximum image resolution) for processing images on different phones?
You can get your approx. memory limit for your app (in megabytes) by using the activity managers
getMemoryClass()method:You can use that and calucate the maximum sizes of your image(s), this depends on the internal image format of course (see Bitmap.Config).