Skip to content

A Flutter plugin for listing, inspecting, and interacting with installed Android applications, including app details, permissions, launch, uninstall, and app change monitoring.

License

Notifications You must be signed in to change notification settings

okmsbun/flutter_device_apps

Repository files navigation

flutter_device_apps

Pub Star on Github Flutter Website License: MIT GitHub Repository


A Flutter plugin to list, inspect, and interact with installed apps on Android devices. Get app details, launch applications, and monitor installation changes programmatically.


Install

Add to your pubspec.yaml:

dependencies:
  flutter_device_apps: latest_version

Quick start

List apps

import 'package:flutter_device_apps/flutter_device_apps.dart';

final apps = await FlutterDeviceApps.listApps(
  includeSystem: false,
  onlyLaunchable: true,
  includeIcons: false,
);

for (final app in apps) {
  print('${app.appName}  •  ${app.packageName}');
}

Parameter details:

  • includeSystem: Include pre-installed system apps like Settings, Phone dialer, etc.
  • onlyLaunchable: Only return apps that have launcher icons. If false, includes all installed packages (libraries, services, background apps).
  • includeIcons: Load app icons as bytes.

Get details for one app

final info = await FlutterDeviceApps.getApp('com.example.myapp', includeIcon: true);
if (info != null) {
  print('Version: ${info.versionName} (${info.versionCode})');
  print('Category: ${info.category}');
}

AppInfo fields

Most common fields you’ll use (all fields, grouped):

  • packageName, appName – App identity (e.g. com.example.app, display name)
  • versionName, versionCode – Version info
  • firstInstallTime, lastUpdateTime – Install / update times
  • isSystem, enabled – System app & enabled state
  • iconBytes – Icon bytes (when requested)
  • category – App category code (e.g. game / social / productivity)
  • targetSdkVersion, minSdkVersion – Target & minimum Android SDK levels
  • processName – Process name the app runs in
  • installLocation – Install preference/location (auto / internal / external)

Get requested permissions on demand

final permissions = await FlutterDeviceApps.getRequestedPermissions('com.example.myapp');
if (permissions != null) {
  for (final p in permissions) {
    print('Permission: $p');
  }
}

Open / Settings / Uninstall

await FlutterDeviceApps.openApp('com.example.myapp');
await FlutterDeviceApps.openAppSettings('com.example.myapp');
await FlutterDeviceApps.uninstallApp('com.example.myapp');

Listen to app changes

// Start listening to app changes.
late final StreamSubscription sub;
sub = FlutterDeviceApps.appChanges.listen(
  (e) {
    print('App event: ${e.type} → ${e.packageName}');
    
    switch (e.type) {
      case AppChangeType.installed:
        print('New app installed: ${e.packageName}');
      case AppChangeType.removed:
        print('App uninstalled: ${e.packageName}');  
      case AppChangeType.updated:
        print('App updated: ${e.packageName}');
      case null:
        print('Unknown change type');
    }
  },
  onError: (error) => print('Monitoring error: $error'),
);

// if needed, stop listening to app changes.
await sub.cancel();

Get installer store information

final store = await FlutterDeviceApps.getInstallerStore('com.example.myapp');
if (store != null) {
  print('Installed from: $store');
}

Common installer stores:

  • "com.android.vending" - Google Play Store
  • "com.sec.android.app.samsungapps" - Samsung Galaxy Store
  • "com.huawei.appmarket" - Huawei AppGallery
  • ...

Android notes

Package visibility (Android 11+)

No extra permissions needed for basic usage (listing launcher apps and getting app details).

If you need to access ALL apps (including system apps):

If you want listApps() or getApp() to see all installed applications instead of just launchable ones, add this permission to your AndroidManifest.xml:

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

Uninstall permission

To use the uninstallApp() function, add this permission to your AndroidManifest.xml:

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

License

MIT © 2026 okmsbun

About

A Flutter plugin for listing, inspecting, and interacting with installed Android applications, including app details, permissions, launch, uninstall, and app change monitoring.

Topics

Resources

License

Stars

Watchers

Forks