Start with API 8 (see official Documentation: APP Install Location | Android developers), you can install your app in an external storage (for example, on an SD card installed on your device). This is an optional feature and you can declare the android:installlocation property in the Androidmanifest.xml of your app. If you do not declare this attribute, your application will be installed on-premises and cannot be moved to external storage.
Modify the android:installlocation property under the <manifest> element in the androidmanifest.xml file and assign the value "preferexternal "or"auto"allows the system to install the app into the external storage. The code is as follows:
<xmlns:android= "http://schemas.android.com/apk/res/android" Android : installlocation= "preferexternal" >
If the android:installlocation attribute is declared as preferexternal, it means that you require the application to install the external storage, However, the system does not guarantee that your program will be installed in external storage. If the external storage space is full, the program will be installed in the internal storage. Users can also move your app between two stores. If autois declared, it indicates that your application can be installed externally, but you do not have a preference for an installation location. The system depends on some factors to determine where your application is installed. Users can also move your program between two stores.