flutter_device_apps_android 2.1.0
flutter_device_apps_android: ^2.1.0 copied to clipboard
Android implementation of flutter_device_apps (federated plugin).
flutter_device_apps_android #
A Flutter plugin to list installed Android apps, get app icons, check installation status, launch apps, and monitor app changes. Also detects packaged frameworks.
Requirements #
Requires Android API 24+, Flutter 3.44+, and Dart 3.12+. API reference · Guide: List installed Android apps in Flutter
Main package #
flutter_device_apps provides a single entry point for Android and macOS APIs
and uses this plugin on Android. Main package · Main package README
Usage #
Add the Android package to your Flutter app.
flutter pub add flutter_device_apps_android
import 'package:flutter_device_apps_android/flutter_device_apps_android.dart';
Call WidgetsFlutterBinding.ensureInitialized() if you use the API before
runApp(). The binding is already available in initState() and UI callbacks.
List installed Android apps #
final apps = await FlutterDeviceAppsAndroid.listApps(
includeSystem: false,
onlyLaunchable: true,
includeIcons: false,
packageNamePrefix: null, // e.g. 'com.google.'
packageNameContains: null, // e.g. 'photos'
);
Both filters are case-sensitive and must match when provided. Use null or '' to disable a filter.
Get apps by package name #
final app = await FlutterDeviceAppsAndroid.getApp('com.whatsapp', includeIcon: true);
final apps = await FlutterDeviceAppsAndroid.getApps(
['com.whatsapp', 'org.telegram.messenger'],
includeIcons: true,
);
getApp() returns null if the app is unavailable. getApps() returns [] when no apps are found.
Detect packaged app frameworks #
final frameworks = await FlutterDeviceAppsAndroid.detectAppFrameworks('com.example.app');
Detects packaged indicators for Flutter, React Native, Unity, Unreal Engine, Godot, .NET Android, Jetpack Compose, Kotlin standard library, AndroidX AppCompat, Capacitor, Cordova, Qt, NativeScript, and SDL. Matches describe packaged components, including transitive dependencies. An empty list means the scan found no supported indicator. A failed scan throws.
Listen to app install, update, and uninstall events #
final subscription = FlutterDeviceAppsAndroid.appChanges.listen(
(event) => print('${event.type}: ${event.packageName}'),
onError: (error) => print(error),
);
Stop listening with await subscription.cancel().
More APIs #
All methods below belong to FlutterDeviceAppsAndroid.
| Method | Purpose |
|---|---|
getAppIcon(packageName) |
Get PNG icon bytes. |
isAppInstalled(packageName) |
Check whether the app is installed and visible. |
isSystemApp(packageName) |
Check system app status. Returns null if unavailable. |
isAppEnabled(packageName) |
Check enabled status. Returns null if unavailable. |
isAppLaunchable(packageName) |
Check whether a launch intent exists. |
getRequestedPermissions(packageName) |
Get requested permission names. |
getInstallSourceInfo(packageName) |
Get installer and install source metadata. |
openApp(packageName) |
Launch the app. |
openAppSettings(packageName) |
Open Android app settings. |
uninstallApp(packageName) |
Open the uninstall confirmation screen. |
Android setup #
Android limits app queries to visible packages. The plugin declares visibility for
launcher apps. Add any of the declarations below inside <manifest> and outside
<application> in android/app/src/main/AndroidManifest.xml.
Declare each additional package you need to query.
<queries>
<package android:name="com.example.service" />
</queries>
Add QUERY_ALL_PACKAGES when your app needs broader visibility and meets Google
Play’s eligibility requirements. Android package visibility · Google Play policy
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
Apps targeting Android 9 (API 28) or later require REQUEST_DELETE_PACKAGES to
open the uninstall confirmation screen with uninstallApp(). Android permission reference
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
Community Standards #
Issues · Contributing · Code of Conduct · Security Policy
License #
MIT © 2026 okmsbun