如何检查应用程序是否是媒体管理应用程序?

发布于 2025-01-23 17:39:39 字数 453 浏览 4 评论 0原文

从Android 12开始,类似画廊的应用程序必须请求Manage_Media许可,并且可以通过intent(settings.action_request_manage_media)将用户快速重定向到设备设置,以将应用程序设置为媒体管理应用程序。

如果用户真正使该应用程序成为媒体管理应用程序,如何在运行时检查?它似乎不适用于检查Manage_Media的许可,也没有找到emoverument.isexternalStorageManager()的替代方案。我基本上需要允许“允许管理所有文件”?为画廊。

Starting with Android 12, gallery-like apps have to request the MANAGE_MEDIA permission and the user can be quickly redirected to the device settings with Intent(Settings.ACTION_REQUEST_MANAGE_MEDIA) to set an app as a Media management app.

How to check during runtime if the user really made the app a Media management app? It doesn't seem to work with checking MANAGE_MEDIA permission, nor have I found an alternative for Environment.isExternalStorageManager(), that is used by file managers. I basically need an alternative of How to check if "Allow management of all files" is allowed? for galleries.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

那片花海 2025-01-30 17:39:39

发现它是MediaStore.CanManageMedia()

found it, it is MediaStore.canManageMedia()

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文