My app is bit heavier in size. Currently I am installing it in internal memory. I can also use android:installLocation="preferExternal" to install it in external memory.

However,I want to modify that ,I want my app to initially use internal memory ,in case if sufficient memory not available it should try to install in external memory.

How to achieve that ??

有帮助吗?

解决方案

Try

android:installLocation="auto"

The application may be installed on the external storage, but the system will install the application on the internal storage by default. If the internal storage is full, then the system will install it on the external storage. Once installed, the user can move the application to either internal or external storage through the system settings.

其他提示

If you simply set android:installLocation = "auto" , the Android system will automatically take care of this for you. It will decide where to install your app based on several factors, one of which is memory usage. The user can also transfer between internal and external memory.

Please note however, if you app meets any of these criteria, you should not allow it to be installed in external memory.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top