简体   繁体   English

强制将应用安装在内部存储上

[英]Force app to install on internal storage

I want my app to be installable only on internal storage. 我希望我的应用只能在内部存储上安装。 I have tried two options: 我尝试了两种选择:

  1. Not specifying any storage preference in the manifest ( the Docs say that this forces the app to install only to internal storage ) 没有在清单中指定任何存储首选项( 文档说这会强制该应用仅安装到内部存储
  2. Explicitly specifying android:installLocation="internalOnly" in the manifest 在清单中明确指定android:installLocation="internalOnly"

In both cases, when I try to install it on a tablet that's running Android 4.4.2, Kernel 3.4.67, and having an SD card, it prompts me to select whether the app should be installed on Tablet Storage or the SD card. 在这两种情况下,当我尝试将其安装在运行Android 4.4.2,内核3.4.67并具有SD卡的平板电脑上时,它都会提示我选择应将应用程序安装在Tablet Storage还是SD卡上。 The tablet has ample free internal storage (9 GB). 数位板具有足够的免费内部存储空间(9 GB)。 The default write disk is also set to Internal Storage. 默认写磁盘也设置为“内部存储”。

Is there any way to bypass this prompt and install to internal storage after the user approves the permissions needed by the app? 用户批准应用程序所需的权限后,是否有任何方法可以绕过此提示并安装到内部存储中?

According to the docs , the flag you are using should not allow install on the SDCARD or any external storage. 根据docs ,您使用的标志不应允许安装在SDCARD或任何外部存储上。 This appears to be a bug. 这似乎是一个错误。

Post at the bug location to help give it attention. 错误位置张贴内容以帮助引起注意。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM