如何检查应用程序是否是媒体管理应用程序?
从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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发现它是
MediaStore.CanManageMedia()
found it, it is
MediaStore.canManageMedia()