androidsd-cardandroid-1.6-donut

Set install location for Android 1.6?


I'm writing an application that is compatible with Android 1.6, but I would like to give users running Android 2.2 the option of moving the application installation to their sd card.

How can I compile my application for 1.6, but still allow 2.2 users to install it to their sd?


Solution

  • In your manifest:

    Then go to Project > Properties > Android (on the left), change the build target to 2.2, and you're all set.

    Your project will build using 2.2 (but still only requires 1.6), but devices running 1.6 will simply ignore your new "installLocation" setting in the manifest. Just be careful not to add any 2.2-introduced material in your actual code, since the compiler will no longer catch it.