简体   繁体   English

为什么在 Flutter 中无法获取 Android 的已安装应用程序列表?

[英]Why can't I get a list of installed apps for Android in Flutter?

I have been trying out 2 libraries in order to get a list of all the installed apps for Android.我一直在尝试 2 个库,以获取 Android 的所有已安装应用程序的列表。 The libraries that I use are made for the Flutter framework.我使用的库是为 Flutter 框架制作的。 When I try to get a list of installed apps, I noticed that only the app that I am working on is being shown in this list and not all the installed apps.当我尝试获取已安装应用程序的列表时,我注意到只有我正在处理的应用程序显示在此列表中,而不是所有已安装的应用程序。 How am I able to override this limitation?我怎样才能超越这个限制? Is there anyone who experienced the same problem?有没有人遇到过同样的问题?

These are the libraries that I have tried:这些是我尝试过的库:

  • device_apps & android_intent device_apps & android_intent
  • flutter_appavailability颤振应用程序可用性

A swift help is much appreciated!非常感谢 swift 帮助!

<manifest...> <清单...>

<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />

add this permission to query the packages添加此权限以查询包

By using the package https://pub.dev/packages/device_apps you can get list of packages /apps in the device通过使用 package https://pub.dev/packages/device_apps您可以获得设备中的包/应用程序列表

And you can get list of packages with:您可以通过以下方式获取软件包列表:

List apps = await DeviceApps.getInstalledApplications();列出应用程序 = 等待 DeviceApps.getInstalledApplications();

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

相关问题 使用cordova如何获得Android设备上已安装的应用程序列表? - Using cordova how can i get list of installed apps on android device? 如何获取所有已安装应用的列表? - How can I get a list of all installed apps? Android-获取已安装应用程序签名的列表 - Android - get list of installed apps signatures Android获取所有已安装应用的列表 - Android get a list of all installed apps 如何获取 Android 11 中已安装应用程序的列表 - How to get a list of installed apps in Android 11 在 android 中,如何获取所有已安装的外部 memory 的列表 - In android how can I get a list of all external memory installed 最有效的方式(我的意思是加载速度-性能)来获取Android上已安装应用程序的列表? - most efficient way(load speed-performance i mean) to get a list of installed apps on android? XAMARIN Android 应用程序,如何在 MVVM 中获取已安装应用程序的列表作为服务? - XAMARIN Android App, how do I get a list of installed apps as a service in MVVM? Android-如果未安装应用程序图标,如何获取? - Android - How can I get Application Icon if it isn't installed? 我的应用程序已安装在设备上,但我找不到该设备。 Android的 - My apps is installed on device but i can't find the device. Android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM