You can allow your app to be installed to the SD card using the android:installLocation
manifest attribute. This can be set to preferExternal
or auto
, depending on whether you would like to recommend that it be installed on the SD card, or simply allow it. By default, applications cannot be installed to the SD card for backwards-compatibility reasons, so you must opt-in to this feature if you want your users to be able to use it.
From the documentation:
When your application is installed on the external storage:
- There is no effect on the application performance so long as the external storage is mounted on the device.
- The .apk file is saved on the external storage, but all private user data, databases, optimized .dex files, and extracted native code are saved on the internal device memory.
- The unique container in which your application is stored is encrypted with a randomly generated key that can be decrypted only by the device that originally installed it. Thus, an application installed on an SD card works for only one device.
- The user can move your application to the internal storage through the system settings.
Thus, you shouldn't worry about license protection too much; there is encryption built into the feature. You also generally shouldn't worry about license protection because any form of copy protection or DRM tends to be more harmful to honest users than to pirates. As long as someone is able to use your app, someone will be able to pirate it; it is well nigh impossible to create an unbreakable DRM scheme. If your app is already in internal storage, it's likely already pirated. Most users are honest, however, and will buy the app from the Market, so you won't really gain much from stopping piracy (most people who download pirated apps are those who don't have access to paid apps in the Market; it's still not available in many countries).
Anyhow, the upshot is that this should be about as secure as your app already is, and just allows users more flexibility in where to store their app. It's not enabled by default in case of bugs that cause applications that aren't expecting it to break, but it should be perfectly safe to enable.