gpt4 book ai didi

android - 如何在 android 10(Q) 中删除启动器图标

转载 作者:行者123 更新时间:2023-12-03 17:27:08 26 4
gpt4 key购买 nike

在 API 29 之前,我们可以通过移除设备中的启动器图标来移除

<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

在 list 文件中。

如前所述 here

As of Android Q, at least one of the app's activities or synthesized activities appears in the returned list unless the app satisfies at least one of the following conditions:


  • The app is a system app.

  • The app doesn't request any permissions.

  • The app doesn't have a launcher activity that is enabled by default. A launcher activity has an intent containing the ACTION_MAIN action and the CATEGORY_LAUNCHER category.

  • Additionally, the system hides synthesized activities for some or all apps in the following enterprise-related cases:

    If the device is a fully managed device, no synthesized activities for any app appear in the returned list. If the current user has a work profile, no synthesized activities for the user's work apps appear in the returned list.


  • 第三个条件与不启用启动器 Activity 相同。

    如何在android 10中实现这一点?

    最佳答案

    我认为第三个条件是错误的或过时的。

    Google 当前的 Android 10 模拟器镜像(Google APIs Intel x86 Atom System Image 29_r09)上的行为与文档不同:

    getActivityList()始终返回至少一项 Activity ,除非应用程序至少满足一项:

  • 系统应用
  • 标记完全为空,即没有 Activity 、服务……声明
  • 未声明权限

  • 此行为对应于 release notes来自 Android Q 测试版:

    Launcher icon visibility

    In Android Q Beta 2, packages that don't declare any permissions in their respective manifest files are hidden from the All apps tray, as are the following types of apps:

    • System apps
    • Apps that don't contain any components inside their respective manifest's <application> tag

    关于android - 如何在 android 10(Q) 中删除启动器图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59639700/

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