Android devices, heap size - android

Currently my application works with android 2.1+ devices.
This app processes bitmaps. Sometimes I get OutOfMemory (eg. HTC G1 [16mb heap]).
I would like to specify this app for devices with min. 48mb heap.
It is impossible to set that in Manifest.xml but I thought about devices with android 2.3.3.
I could set minimum android 3.0 but 2.3.3 has over 38% devices.
What is the heap size for devices with stock android 2.3.3?

Please refer these links :
Manifest Heap-Size
Devices Heap-Size
Another Heap-Size Explain
Some Google and stackoverflow search.

Related

Hardware acceleration: What happens on pre-Honeycomb devices?

I'm developing an application for Android that supports devices back to Android 2.1 (API Level 7). I'd like to enable hardware acceleration for devices with big screens, because they get a lag in certain situations otherwise. At the same time I have a problem with the memory budget for my application on older devices, because I use a lot of memory for images.
I have read here, that enabling hardware acceleration uses 8 MB more RAM.
Hardware accelerated drawing is not all full of win. For example on
the PVR drivers of devices like the Nexus S and Galaxy Nexus, simply
starting to use OpenGL in a process eats about 8MB of RAM.
As old devices have only 24 MB of RAM per application, this would bring my app into an OutOfMemoryException pretty soon. Newer devices have up to 64 MB per app. So there shouldn't be a problem. My question is now, how hardware acceleration behaves on pre-Honeycomb devices when it's turned on. Does it simply nothing, so don't use the 8 MB RAM? Or does it use this 8 MB RAM anyway, if you have enabled it?
Thanks a lot for your answers.
Cheers Dude
In the meanwhile I have found the answer. It's pretty simple. The android:hardwareAccelerated tag in the android manifest file has been introduced at API level 11. So pre-11 devices cannot understand this tag and therefore they do just nothing.
Cheers

what kind of mobile will be updated to Android 4.0.3 or 4.1 version?

I made an application under Android emulator provided worked perfectly on all types of dispositives (small, normal, large, xlarge) (-ldpi,-mdpi, -hdpi,-xhdpi). But the last few days I saw that in some phones with the latest versions of android (these phones consist with a lower bar like tablets) did not look properly.
So my question is: what kind of phones have or can upgrade to these versions of android? (small-HDPI, normal-HDPI, normal-xhdpi???)
Thank you!
Theoretically, nothing stops a manufacturer from making an ldpi device capable of running ICS or JB. However, in practice, most devices with ldpi and even mdpi to some extent do not have good enough processors in both CPU and GPU departments to be able to run the newer version of Android.
Till date, the lowest I've seen an ICS device go screenwise is a normal-mdpi display. However, I do not know the details of every device in existence, and there could be lower devices as well.
You should design your app keeping in mind all device configs, at most excluding only ldpi and small displays.

What is the default app heap size on ICS (Android OS4.0)?

I'm trying to make my app ICS-compatible and I'm getting OutOfMemoryErrors that I never got with 2.3.3 and earlier. I don't own an ICS device so I'm using the emulator and I noticed the default heap size is 24M, which is the same as previous versions (on the emulator).
Is 24M the default heap size on actual devices? What about the Google Nexus?
Thanks in advance...
Answering my own question:
I did not find the exact size, in fact it is likely different on different devices, but I can confirm it's bigger than 24Mb after I tested my app on a Google Nexus and didn't get any OOM errors. The emulator probably defaults to 24Mb for all OS versions.

Which Android devices should I test against? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
What hardware devices do you test your Android apps on?
I'm porting my iPhone app over to Android, planning on releasing it in the Google and Amazon AppStores. I'm planning on targeting OS versions 2.2 and 2.3, as they have the highest market share.
But, what devices have the highest market share? I want to make sure I test on the "common" devices, and so I'm looking for resources / recommendations about which devices to include in my testing regimen.
It depends the target country as the market share of a device varies.
I would recommend covering some of the following attributes
Devices with screens : ldpi, mdpi and hdpi
Devices with screen sizes : small screen (3 inches), normal screen ( 4 inches ) large screen ; 7 inches or more
Refer to the platform versions link for more details
http://developer.android.com/resources/dashboard/platform-versions.html
There are no dominating phone models in the android world. My app supports 2.2+ (API 8). The top three phones models among its users are Galaxy S2 7%, EVO 7% and Galaxy S 2.7% with a long tail of 'other models'. Welcome to the free world. ;-)
From compatability view point, it is safer, if you can live with it, not to use targetSdkVersion and to have minSdkVersion == target SDK version (as you set in eclipse).
Also, make sure to test in portrait and landscape (unless if your app is limited to a single app) including transitions mid activity.
AFAIK, As long as your app working on target OS, device shouldn't be an issue. Anyway, you may try on samsung galaxy, HTC etc., By the way you may need to make sure it is working for different resolutions.

Android devices with small heap

is there a list of android devices and their heap size?
I know how to check programmatically in the app, but I am curious to know.
I have devices with android heaps 32M and greater, and they have at least 512MB RAM. Could I simply assume that all devices with 512MB Ram have 32M of heap? And that devices with less ram have less heap? (16mb? 24mb? ???)
thanks
is there a list of android devices and their heap size?
Not that I am aware of.
Could I simply assume that all devices with 512MB Ram have 32M of heap?
Heap size recommendations are driven more by Android OS release and screen size. Android OS release and screen size also have an impact on minimum effective RAM on the device. So the concepts are loosely correlated, but that's it.
I'd like a list so I could determine mainly if Android 2.2+ devices with 16mb heap exist
AFAIK, you cannot rule out that combination. After all, please remember that Android is open source, so modded ROMs are welcome to configure heap sizes however they want. IIRC, at least one allows the user to choose the heap size. And there are no rules regarding device RAM or heap size in the Compatibility Definition Document, so device manufacturers are welcome to try odd combinations.
Well, you can't assume absolutely anything. There may be a trend like heaps of size 32mb+ on devices with 512mb+ memory. But that's just a trend, not a rule.
There are sofar 4 different types(based on heap size) of android devices.
Those are:
G1----16MB
Droid-24MB
Nexus one-36MB
XOOM-48MB.
XOOM is the device which has highest heap memory.
A source that could help guessing is also if you create emulators. If you create an emulator for Android 1.5, it doesn't automatically adds the "Max VM application heap size" attribut under hardware. But starting with Android 1.6 it sets it automatically to 24 MB. If you choose Android 4.0.3 then it sets it automatically to 48 MB. Maybe that's some kind of typical minimal heap sizes for these Android versions.
EDIT: Just found this: https://stackoverflow.com/a/2634738/1037994. So combining the emulator attribut with this statement, I would guess 24 MB as minimum for Android 2.2+ devices.

Categories

Resources