Hardware acceleration: What happens on pre-Honeycomb devices? - android

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

Related

Android devices, heap size

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.

Preparing apps for the nexus 10

I am working on an android Audio Recording application, our app is currently designed to work on all android phones, the Nexus 7 and the Motorola Xoom tablets.
I was wondering if there are any guidelines or best practices to re-design/modify our app for Nexus 10. More specifically, any pointers on the below points would be really helpful:
UI guidelines to support the new 2560x1600 resolution
Android resource files related modifications (based on similar guidelines)
Any sample or open sources apps that have been modified to work on the nexus 10
Best practices creating and running a nexus 10 emulator since there is no such AVD device by default (screenshot below). Any thoughts on creating one, keeping the high resolution in mind.
As long as you have xhdpi assets, and layouts made for 10" tablets, you shouldn't have to do anything (except add a new xxhdpi launcher icon, as #Mattias mentioned).
To make a Nexus 10 AVD, navigate to Device Definitions:
Then, click New Device. Fill it out something like this:
Now it will be listed in the devices drop-down that you show above.
Regarding your second point, resources:
While the nexus 10 is a xhdpi device, it will use the launcher icon from xxhdpi "one bucket up" if available, so make sure to provide one as it will look much better/clearer/sharper. Reason is that there is room for a bigger icon on this device. Launcher icon size at xxhdpi is 144x144 pixels.
For reference see:
https://plus.google.com/118292708268361843293/posts/ePQya3KsTjW
The best way to emulate the Nexus 10 is to use AndroVM. I am currently running Android on it with the full Nexus 10 2560x1600 resolution and it fits onto my HD screen if I set AndroVM to use 320dpi.
Oh.. and it's VERY fast :-)
I personally use it over emulators and real hardware devices as it's extremely responsive and the deployment of the APK is lightning fast.
I do not contribute to the AndroVM project myself by the way, but it has speeded up my own development cycle considerably. In all development cycles, a developer waiting to see if their code tweaks work using an emulator or a hardware device adds considerable time overhead. I would thoroughly recommend using AndroVM regardless of screen size during normal code development.

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.

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