Appcelerator Titanium Quick Tip: Enable “Move to SD Card” in Android Applications

Hi all and welcome to our site.

We will introduce ourselves soon, in the meantime I want to share with you a small tip I learned in these days after being stuck for some time on this problem.

Are you developing an Android application with Appcelerator Titanium?
Do you want to enable the Android Move to SD Card Feature?

Well, you can’t do it directly editing the manifest file (build/android/AndroidManifest.xml) but you have to add the following lines to the tiapp.xml file in the root directory of the project. Remember to add these lines inside the tags.

<android xmlns:android="http://schemas.android.com/apk/res/android">
    <tool-api-level>8</tool-api-level>
    <manifest android:installLocation="auto">
       <uses-sdk android:minSdkVersion="7" />
    </manifest>
</android>

Now when you install your Android Titanium App on your device, you will be prompted by apps like App 2 SD to move your app to the SD card, freeing the internal memory.

I hope this should be helpful for you, in the following days we will add a lot of features and tutorials to our site.

Stay tuned.

L

  • tg147

    Great, but what if I’m using a Custom AndroidManifest.xml file?

  • http://picreate.com Ben McNelly

    hey @ tg147, not sure how to format code in this comment box so check this out.

    https://gist.github.com/1073971

    Essentially you just add this to you xmlns:android Manifest…
    android:installLocation="auto"

  • http://goo.gl/Mnel Ademar Oliveira

    Sorry but here occurred an error, help-me please.

    error:

    AndroidManifest.xml does not declare a Java package: Build aborted. AndroidManifest.xml /Memoria line 1 Android ADT Problem
    Invalid start tag android, expected AndroidManifest.xml /Memoria line 2 Android AAPT Problem
    :(

    my manifest:

    8

  • http://goo.gl/Mnel Ademar Oliveira

    my manifest:

    8

  • http://goo.gl/Mnel Ademar Oliveira

    <!–

    8

    –>

  • senthilkumar D

    Hello Guys! I’m new to Titanium can anyone help me how to disable sd card memory cos
    whenever i’m compiling its showing me that requesting sd card failed and it makes 60s for that..

    Thank you!!