installed_apps
डिवाइस पर इंस्टॉल किए गए ऐप्स से संबंधित उपयोगी विधियों वाला फ्लटर प्लगइन।
डिवाइस पर इंस्टॉल किए गए ऐप्स से संबंधित उपयोगी विधियों वाला फ्लटर प्लगइन।
{"sdk":"flutter"}^6.0.0यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
Installed Apps is a Flutter plugin that provides utilities to interact with installed apps on a device. You can list installed apps, get app info, launch apps, open settings, and more.
⚠️ Currently, only Android is supported. iOS methods return default/fallback values.
Version 2.0.0 has some breaking changes, for example, getInstalledApps now uses **named arguments
** instead of positional arguments as before. Additionally, some other argument names have been
updated.
flutter pub add installed_apps
Or check the Installation Guide.
Example project: GitHub
List<AppInfo> apps = await InstalledApps.getInstalledApps(
// Optional: whether to exclude system apps from the list. Default is true.
excludeSystemApps: true,
// Optional: whether to exclude apps that cannot be launched (no launch intent). Default is true.
excludeNonLaunchableApps: true,
// Optional: whether to include app icons in the result. Default is false.
withIcon: false,
// Optional: filter apps whose package names start with this prefix. Default is null (no filtering).
packageNamePrefix: "com.example",
// Optional: filter apps by platform type (Flutter, React Native, etc.). Default is null (no filtering).
platformType: PlatformType.flutter,
);
AppInfo? app = await InstalledApps.getAppInfo("com.example.myapp");
class AppInfo {
String name;
Uint8List? icon; // nullable
String packageName;
String versionName;
int versionCode;
PlatformType platformType;
int installedTimestamp;
bool isSystemApp;
bool isLaunchableApp;
AppCategory category;
}
await InstalledApps.startApp("com.example.myapp");
InstalledApps.openSettings("com.example.myapp");
bool? isSystem = await InstalledApps.isSystemApp("com.example.myapp");
bool? success = await InstalledApps.uninstallApp("com.example.myapp");
bool? installed = await InstalledApps.isAppInstalled("com.example.myapp");
⚠️ Only available on Android API 28+. On lower SDK versions, all apps will have
undefined.
enum AppCategory {
game(0, "Game"),
audio(1, "Audio"),
video(2, "Video"),
image(3, "Image"),
social(4, "Social"),
news(5, "News"),
maps(6, "Maps"),
productivity(7, "Productivity"),
accessibility(8, "Accessibility"),
undefined(-1, "Undefined");
}
enum PlatformType {
flutter('flutter', 'Flutter'),
reactNative('react_native', 'React Native'),
xamarin('xamarin', 'Xamarin'),
ionic('ionic', 'Ionic'),
nativeOrOthers('native_or_others', 'Native or Others');
}
The QUERY_ALL_PACKAGES permission is required for some functionality of this package, but
including it can cause Play Store rejections if your app doesn’t justify it. To handle this, either
declare its necessity in the Play Store listing or use tools:node="remove" in your manifest to
exclude it while still using the package (note this will limit visibility to all apps). For
multi-flavor setups, you can include the permission in src/dev/AndroidManifest.xml for
internal/dev builds and remove it in src/playstore/AndroidManifest.xml for Play Store builds,
ensuring each flavor has the correct manifest without affecting core functionality.
QUERY_ALL_PACKAGES permission for full app visibility. Ensure compliance with
Play Store policies.If you encounter any issues or have suggestions, please open an issue on GitHub. Contributions and feedback are welcome!