Currently, I have a piece of code, which is designed to run both in Android 2.3 and 4+
The code will perform much better (Where it will not have OutOfMemory exception most of the time), if android:largeHeap
is being applied in AndroidManifest.xml.
<application
android:name=".MyApplication"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:screenOrientation="nosensor"
android:largeHeap="true"
Currently, my android:minSdkVersion
need to set to 15 instead of 10 (Android 2.3). If not, android:largeHeap
is not allowable in AndroidManifest.xml.
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="15" />
Within single APK, how possible I can set
- Use
android:largeHeap
option if I were in Android 4+ - Do not use
android:largeHeap
option if I were in Android 2.3