Saturday, April 23, 2011

Xperia™ game developer tip: How to make an application install directly to the SD card

When designing your game for the Xperia™ PLAY or other Android™ devices, Sony Ericsson highly recommends that you enable the Move to SD card option. This will make your gaming files movable to external storage. This is an optional feature you can declare for your application with the android:installLocation manifest attribute. If you do not declare this attribute, your application will be installed on the internal storage only and it cannot be moved to the external storage.

Installing on the external storage is ideal for large applications, especially games, since they are not tightly integrated with the system. Making the gaming files movable to the SD card increases the performance of the device, and also maximizes the number of games or apps that can be installed in the phone memory of the device. Otherwise, not allowing this feature means users may be forced to delete pre-installed games or games already paid for, in order to free up space.

To make an application install directly to the SD card, use the attribute android:installLocation=”preferExternal” in order to make your application install to the SD Card by default.

For more information about install location, refer to http://developer.android.com/guide/appendix/install-location.html.

android:installLocation=”preferExternal”

No comments:

Post a Comment