android - 在 Android API 29 中使用旧存储

标签 android storage android-10.0

我正在尝试为我的应用程序使用“旧存储”,以便它可以在 API29 上运行,作为临时措施,直到我能够理解新的存储模型。我已经设置了

requestLegacyExternalStorage="true"

在 list 中,但它仍然不起作用。 Android 文档说:

Test scoped storage

To enable scoped storage in your app, regardless of your app's target SDK version and manifest flag values, enable the following app compatibility flags:

DEFAULT_SCOPED_STORAGE (enabled for all apps by default) FORCE_ENABLE_SCOPED_STORAGE (disabled for all apps by default)

To disable scoped storage and use the legacy storage model instead, unset both flags.

如何取消设置标志?还有其他建议吗?

最佳答案

回到主要问题:

How do I unset the flags? Any other advice?

您提到的标志(DEFAULT_SCOPED_STORAGE 和 FORCE_ENABLE_SCOED_STORAGE)仅用于开发目的。您可以在设置的应用兼容性更改面板中进行设置。要找到此面板,您必须在设置中解锁开发者选项,然后您可以在其中找到应用兼容性更改

有关详细信息,请参阅文档:How to identify which changes are enabled

关于android - 在 Android API 29 中使用旧存储,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64775548/

相关文章:

linux - 在系统内安全存储加密 key 的 TPM 替代方案

android - MediaStore - BUCKET_DISPLAY_NAME 仅出现在 API 29+ 上?

java - Android 的 Random.nextInt(2^N) 有什么问题?

安卓。如何让按钮显示为 PRESSED,直到该按钮创建的操作完成?

java - 直播链接 MediaPlayer Android

android - 如何列出android 10上的所有pdf文件?

android - Webview 的 loadData() 在 android 10.0 (Q) 中不起作用

android - JwPlayer Gradle 同步错误

Android Social Game 实现 - 数据存储和共享

mysql - 如何获取 MySQL 数据库的真实大小?