flutter_device_apps 0.3.1
flutter_device_apps: ^0.3.1 copied to clipboard
App-facing API for listing/inspecting installed apps (federated).
flutter_device_apps #
A Flutter plugin to list, inspect, and interact with installed apps on Android devices. Get app details, launch applications, and monitor installation changes programmatically.
This is the umbrella package of the federated flutter_device_apps
plugin family.
iOS/macOS/Web are not supported (platform limitations). Android only for now.
β¨ What you can do #
- π¦ List installed apps (optionally only launchable apps)
- π Get details for a single app (name, version, install/update times, system flag, optional icon)
- π Open an app by package name
- βοΈ Open system App Settings for a package
- ποΈ Trigger system uninstall UI for a package
- π Listen to app change events (install / uninstall / update)
- πͺ Get installer store information for apps
π± Screenshots #
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Install #
Add to your pubspec.yaml
:
dependencies:
flutter_device_apps: latest_version
Nothing else needed β the Android implementation is pulled in transitively and auto-registered.
Quick start #
List apps #
import 'package:flutter_device_apps/flutter_device_apps.dart';
final apps = await FlutterDeviceApps.listApps(
includeSystem: false, // Skip system apps (Settings, Phone, etc.)
onlyLaunchable: true, // Only apps with launcher icons
includeIcons: false, // Don't load icon bytes (better performance)
);
for (final app in apps) {
print('${app.appName} β’ ${app.packageName}');
}
Parameter details:
includeSystem
(default: false): Include pre-installed system apps like Settings, Phone dialer, etc.onlyLaunchable
(default: true): Only return apps that have launcher icons. Iffalse
, includes all installed packages (libraries, services, background apps).includeIcons
(default: false): Load app icons as bytes. Warning: This significantly impacts performance and memory usage.
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'); // opens system uninstall UI
Listen to app changes #
// Start monitoring app changes
await FlutterDeviceApps.startAppChangeStream();
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');
}
});
// later - stop monitoring and cancel subscription
await sub.cancel();
await FlutterDeviceApps.stopAppChangeStream();
Event types:
AppChangeType.installed
- New app installedAppChangeType.removed
- App uninstalledAppChangeType.updated
- App updated to new version
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.amazon.venezia"
- Amazon Appstore"com.sec.android.app.samsungapps"
- Samsung Galaxy Store"com.huawei.appmarket"
- Huawei AppGallerynull
- Unknown or sideloaded app
AppInfo model details #
The AppInfo
class contains these properties:
class AppInfo {
String? packageName; // e.g., "com.example.app"
String? appName; // e.g., "My App"
String? versionName; // e.g., "1.2.3"
int? versionCode; // e.g., 123 (internal version)
DateTime? firstInstallTime; // When first installed
DateTime? lastUpdateTime; // When last updated
bool? isSystem; // true for system apps
Uint8List? iconBytes; // PNG icon data (if requested)
}
Android notes #
- Package visibility (Android 11+): by default we query launcher apps using
<queries>
intent filters. NoQUERY_ALL_PACKAGES
permission is requested. - Add this to your app's
AndroidManifest.xml
if not present:
<queries>
<intent>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent>
</queries>
- Uninstall permission: To use the
uninstallApp()
function, add this permission to yourAndroidManifest.xml
:
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
- Uninstall behavior: Opening the system uninstall UI may require the app to have appropriate policy permissions on some OEMs for thirdβparty packages. We only start the UI; the final result depends on user action and device policy.
License #
MIT Β© 2025 okmsbun