android large heap

70 views
Skip to first unread message

Dave Dyer

unread,
Jul 14, 2016, 1:43:48 PM7/14/16
to CodenameOne Discussions
I've seen references to adding an android.largeHeap=true attribute to the build hints,
but doing so has no apparent effect on the APK.  Is this advice obsolete?

The codenameone_settings file contains

codename1.arg.android.largeHeap=true

(I also tried ="true", same results)

Here's the resulting manifest from the APK

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" android:minSdkVersion="15" package="com.boardspace" platformBuildVersionCode="23" platformBuildVersionName="6.0-2438415">
    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:xlargeScreens="true"/>
    <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
    <uses-feature android:name="android.hardware.telephony" android:required="false"/>
    <uses-permission android:name="android.permission.INTERNET" android:required="false"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="false"/>
    <uses-feature android:name="android.hardware.location" android:required="false"/>
    <uses-feature android:name="android.hardware.location.gps" android:required="false"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:required="false"/>
    <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" android:required="false"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:required="false"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="false"/>
    <application android:icon="@drawable/icon" android:label="boardspace.net">
        <activity android:configChanges="keyboardHidden|orientation|screenSize" android:label="boardspace.net" android:launchMode="singleTop" android:name="com.boardspace.LaunchStub" android:theme="@style/CustomTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <receiver android:name="com.codename1.impl.android.LocalNotificationPublisher"/>
        <activity android:name="com.codename1.location.CodenameOneBackgroundLocationActivity" android:theme="@android:style/Theme.NoDisplay"/>
        <service android:exported="false" android:name="com.codename1.location.BackgroundLocationHandler"/>
        <service android:exported="false" android:name="com.codename1.location.GeofenceHandler"/>
        <service android:exported="false" android:name="com.codename1.media.AudioService"/>
    </application>
</manifest>


Shai Almog

unread,
Jul 15, 2016, 12:28:41 AM7/15/16
to CodenameOne Discussions
That is an obsolete flag.

Dave Dyer

unread,
Jul 15, 2016, 1:54:39 AM7/15/16
to CodenameOne Discussions
replaced by?

Shai Almog

unread,
Jul 16, 2016, 12:59:32 AM7/16/16
to CodenameOne Discussions
I don't even know why it was there to begin with.

Dave Dyer

unread,
Jul 16, 2016, 1:36:17 PM7/16/16
to CodenameOne Discussions

There ought to be a way to pass these flags through to the build.

Shai Almog

unread,
Jul 17, 2016, 12:21:55 AM7/17/16
to CodenameOne Discussions
I have no idea why that flag existed or what it's purpose was.

Dave Dyer

unread,
Jul 17, 2016, 6:08:07 PM7/17/16
to CodenameOne Discussions
I think the flag probably still exists. 
It's purpose was to reguest android OS to grant "big memory user" status to apps.
I believe it's in the same section of flags as the permissions to use resources.
..which I don't recall any way of setting from codenameone.  


Shai Almog

unread,
Jul 18, 2016, 12:56:34 AM7/18/16
to CodenameOne Discussions
You can use the xpermissions hint to stick whatever you want in that section. I looked thru the code and the docs when you asked and it's not there.
Reply all
Reply to author
Forward
0 new messages