flutter_device_apps 0.4.0 copy "flutter_device_apps: ^0.4.0" to clipboard
flutter_device_apps: ^0.4.0 copied to clipboard

PlatformAndroid

App-facing API for listing/inspecting installed apps (federated).

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})');
}

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