about uscontact

안드로이드 2.2버전 이하에서 SD카드 설치가 지원되도록 설정하는 방법

Author: zemna
Date: April 17, 2021
Share this:

The ability for your application to install on the external storage is a feature available only on devices running API Level 8 (Android 2.2) or greater. Existing applications that were built prior to API Level 8 will always install on the internal storage and cannot be moved to the external storage (even on devices with API Level 8). However, if your application is designed to support an API Level lower than 8, you can choose to support this feature for devices with API Level 8 or greater and still be compatible with devices using an API Level lower than 8.

To allow installation on external storage and remain compatible with versions lower than API Level 8:

  1. Include the android:installLocation attribute with a value of "auto" or "preferExternal" in the element.
  2. Leave your android:minSdkVersion attribute as is (something less than "8") and be certain that your application code uses only APIs compatible with that level.
  3. In order to compile your application, change your build target to API Level 8. This is necessary because older Android libraries don't understand the android:installLocation attribute and will not compile your application when it's present.

When your application is installed on a device with an API Level lower than 8, the android:installLocation attribute is ignored and the application is installed on the internal storage.

Caution: Although XML markup such as this will be ignored by older platforms, you must be careful not to use programming APIs introduced in API Level 8 while your minSdkVersion is less than "8", unless you perform the work necessary to provide backward compatibility in your code. For information about building backward compatibility in your application code, see the Backward Compatibility article.

참고 : http://developer.android.com/guide/appendix/install-location.html

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *


Professional software development agency estalished in Indonesia. We offers website setup, web application development, fulfillment service, and etc.
Follow us
Follow us to get latest news and tutorials.
2022 - Copyright, All Rights Reserved, Made by ZEMNA.NET with ❤️