如何在安装APK时创建目录路径并将文件放入其中? (安装apk时;不在运行程序时)。
答案 0 :(得分:0)
在安装应用程序时无法进行更改。它唯一发生的事情是你在应用程序运行时这样做。
在外部存储上安装apk,
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" ... >
并记住这些,
When your application is installed on the external storage:
1.There is no effect on the application performance so long as the external storage is
mounted on the device.
2.The .apk file is saved on the external storage, but all private user data, databases,
optimized .dex files, and extracted native code are saved on the internal device
memory.
3.The unique container in which your application is stored is encrypted with a randomly
generated key that can be decrypted only by the device that originally installed it.
Thus, an application installed on an SD card works for only one device.
4.The user can move your application to the internal storage through the system
settings.
Warning: When the user enables USB mass storage to share files with a computer or
unmounts the SD card via the system settings, the external storage is unmounted from
the device and all applications running on the external storage are immediately killed.