What Are The Drawbacks Of Using Hardware Accelerated And Large Heap In An App?
Solution 1:
android:hardwareAccelerated="true"
is the default for Android 4.0 and higher, so unless you encounter specific problems with hardware acceleration -- usually coming from custom views -- this should not post a problem.
android:largeHeap="true"
says that your app needs more heap than does the average app. The cost to the user is that they cannot multitask as well -- your process kicks out many of the others on the device. I also would not rule out the possibility of more steps in the OS in the future to inform users of large-heap apps, akin to the steps taken so far to inform users of apps with foreground services. Most apps, outside of those doing substantial image processing from Java code, should be able to avoid android:largeHeap="true"
and therefore not irritate users.
Solution 2:
Hardware acceleration is enabled by default for API 14+ and is usually a good thing to enable, but depending on what you do with custom views it may not always work. There are a few limitations on what drawing operations are supported by Hardware acceleration. For details I suggest looking at https://developer.android.com/guide/topics/graphics/hardware-accel.html . If your application is affected by any of these missing features or limitations, you can turn off hardware acceleration for just the affected portion of your application by calling setLayerType(View.LAYER_TYPE_SOFTWARE, null)
.
Post a Comment for "What Are The Drawbacks Of Using Hardware Accelerated And Large Heap In An App?"