简体   繁体   English

如何在flutter中检索android安装的软件包图标?

[英]How to retrieve android installed packages icons in flutter?

I'm trying to make a simple android app that lists the device installed apps with flutter.我正在尝试制作一个简单的 android 应用程序,它列出了设备安装的带有颤振的应用程序。 Now, there is a plugin called PackageInfo that provides an API for querying information about an application package.现在,有一个名为PackageInfo的插件,它提供了一个 API 来查询有关应用程序包的信息。 But the problem is it only retrieves string information about the package (appName, packageName, version, and buildNumber).但问题是它只检索有关包的字符串信息(appName、packageName、version 和 buildNumber)。 But in addition to these info, I also want to extract package icon which is problematic because flutter's platform channels only supports general types such as int, string, lists but not platform specific types such as drawables.但是除了这些信息之外,我还想提取有问题的包图标,因为 Flutter 的平台通道仅支持通用类型,例如 int、string、list,而不支持平台特定类型,例如 drawable。 Any Idea how this can be accomplished?知道如何做到这一点吗? Thanks谢谢

You can use device_apps plugin, however only Android allows you to fetch installed apps.您可以使用device_apps插件,但只有 Android 允许您获取已安装的应用程序。

Example:例子:

// list of all apps
List<Application> apps = await DeviceApps.getInstalledApplications();

I think what you are looking for is this . 我认为您正在寻找的是这个。 Although i havent used this plugin myself but they clearly state that this plugin will retrieve all the apps along with all the info and also the icons of respective apps. 虽然我自己没有使用过此插件,但他们明确指出该插件将检索所有应用程序以及所有信息以及相应应用程序的图标。 Launcher Assist Plugin here Launcher Assist插件在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Android中获取已安装的软件包? - How to get installed packages in android? flutter 启动器图标的问题,成功安装后它不会在我的 android 设备中显示启动器图标 - issue with flutter launcher icons, after successfully installed it doesn't show the launcher icons in my android device 如何在 Flutter 中设置 Android 图标 - How to set up Android Icons in Flutter 使用flutter_icons_launcher与flutter_icons包冲突 - Conflict using flutter_icons_launcher with flutter_icons packages 如何检索所有已安装的android应用程序 - how to retrieve all installed android applications 如何在android中检索可用/已安装字体的列表? - How to retrieve a list of available/installed fonts in android? 如何在带有图标的已安装Android应用程序列表中添加“多项选择”? - How to add a “multiple choice” in list of installed android applications with icons? 如何在 chromebook 上获取已安装的 android 应用程序包列表? - How to get a list of installed android applications packages on chromebook? android:如何使用string []填充微调框,string []是已安装软件包的列表? - android: How to populate a spinner with a string[] which is a list of installed packages? 如何保存已安装的应用程序图标 - how to save Installed Applications icons
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM