简体   繁体   中英

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. The libraries that I use are made for the Flutter framework. 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
  • flutter_appavailability

A swift help is much appreciated!

<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

And you can get list of packages with:

List apps = await DeviceApps.getInstalledApplications();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM