gpt4 book ai didi

android tv leanback 应用列表

转载 作者:行者123 更新时间:2023-11-29 00:58:04 27 4
gpt4 key购买 nike

作为为 Android TV 开发自定义启动器应用程序的一部分,我必须根据设备中已安装的应用程序列表显示应用程序列表侧屏幕。

要打开设备上的通知屏幕,有一个简单的操作:“com.android.tv.action.OPEN_NOTIFICATIONS_PANEL”

String notificationAction = "com.android.tv.action.OPEN_NOTIFICATIONS_PANEL";
Intent openNotificationPanel = new Intent();
openNotificationPanel.setAction(notificationAction);
startActivity(openNotificationPanel);

不幸的是,在网络上搜索后,我没有找到合适的操作来打开应用程序列表的屏幕。

我明白应该有一个意向操作来为我提供已安装应用的完整列表。

如果有人可以就此问题分享正确的 Intent 操作,那将非常有帮助。

最佳答案

最终我认为谷歌已经从 sdk 版本 28 (pie) 添加了一个 Action Intent -

    Intent.ACTION_ALL_APPS

实现-

    Intent openAllAppsScreenIntent = new Intent(Intent.ACTION_ALL_APPS);
startActivity(openAllAppsScreenIntent);

关于android tv leanback 应用列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53157984/

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