Android app to switch to SD card disabled

The application I made that does not have the ability to go to the SD card ...

On my settings page, I have no way to move the application to the SD card, but it has another application. Why is that? What am I doing wrong? enter image description here

And my application looks like this:

enter image description here

+6
source share
2 answers

Add property to manifest tag

 <manifest xmlns:android="http://schemas.android.com/apk/res/android" .... android:installLocation="auto"> 
+5
source

The Move to SD Card option is disabled if you have

 android:installLocation="internalOnly" 

or if you have not explicitly installed android:installLocation in the manifest file.

According to official documentation

By default, your application will be installed in the internal storage and cannot be installed on external storage unless you define this attribute as “automatically” or “preferred”.

Add

 android:installLocation="auto" 

or

 android:installLocation="preferExternal" 

in tag <manifest>

+8
source

Source: https://habr.com/ru/post/973220/


All Articles