gpt4 book ai didi

Android:下载管理器和 COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:49:03 27 4
gpt4 key购买 nike

我正在尝试正确解决禁用的下载管理器问题。我能找到的最佳信息是 How to Enable Android Download Manager .

PackageManager.COMPONENT_ENABLED_STATE_DISABLEDPackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER 状态对我来说是完全可以理解的。

但经过一个小时的谷歌搜索,我仍然对 PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED 感到困惑。

Documentation阅读:

Flag for setApplicationEnabledSetting(String, int, int) only: This application should be considered, until the point where the user actually wants to use it. This means that it will not normally show up to the user (such as in the launcher), but various parts of the user interface can use GET_DISABLED_UNTIL_USED_COMPONENTS to still see it and allow the user to select it (as for example an IME, device admin, etc). Such code, once the user has selected the app, should at that point also make it enabled. This option currently can not be used with setComponentEnabledSetting(ComponentName, int, int).

这是否意味着我应该将此状态视为已启用?

用户如何选择 DownloadManager?它如何显示

最佳答案

您可以在 DownloadManager 可用时收到通知 setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)

关于Android:下载管理器和 COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40586419/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com