Search code examples
androidflutterexternal-application

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!


Solution

  • <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();