diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2375a3c..40abe04 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+## 1.1.0
+
+- **BREAKING**: Implementations must add `getApps` and `detectAppFrameworks`.
+- **BREAKING**: Added `packageNameContains` to `listApps`; combine filters with AND.
+- **BREAKING**: Removed `getInstallerStore`; use `getInstallSourceInfo`.
+- Added the `AppFramework` enum.
+
## 1.0.0
- **BREAKING**: Raised the minimum Dart SDK version to 3.12.0.
diff --git a/README.md b/README.md
index 1bba01b..ece9333 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
-# flutter\_device\_apps\_platform\_interface
+# flutter_device_apps_platform_interface
-
-
+
+
diff --git a/lib/flutter_device_apps_platform_interface.dart b/lib/flutter_device_apps_platform_interface.dart
index f00f208..03da0bd 100644
--- a/lib/flutter_device_apps_platform_interface.dart
+++ b/lib/flutter_device_apps_platform_interface.dart
@@ -4,6 +4,30 @@ import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'flutter_device_apps_app_change_event.dart';
+/// Framework or runtime families identified by known Android APK library names.
+///
+/// A match indicates a packaged component, not which technology renders every
+/// screen or whether that component is currently in use.
+enum AppFramework {
+ /// Flutter engine libraries.
+ flutter,
+
+ /// React Native libraries, including the legacy JNI library.
+ reactNative,
+
+ /// Unity engine libraries.
+ unity,
+
+ /// Unreal Engine libraries, including the legacy UE4 library.
+ unrealEngine,
+
+ /// Godot engine libraries.
+ godot,
+
+ /// .NET Android runtime glue; does not distinguish MAUI from Xamarin.
+ dotnetAndroid,
+}
+
/// Information about an installed app on the device.
///
/// Contains metadata like package name, version, install times, and optional icon data.
@@ -221,18 +245,39 @@ abstract class FlutterDeviceAppsPlatform extends PlatformInterface {
/// Lists installed apps.
///
- /// [packageNamePrefix] filters package names with a case-sensitive prefix
- /// before loading app metadata and icons. Null or empty disables this filter.
+ /// [packageNamePrefix] matches the start of a package name, and
+ /// [packageNameContains] matches a substring anywhere in a package name.
+ /// Both filters are case-sensitive and run before loading app metadata and
+ /// icons. Null or empty disables each filter independently. When both are
+ /// provided, both must match.
Future> listApps({
bool includeSystem = false,
bool onlyLaunchable = true,
bool includeIcons = false,
String? packageNamePrefix,
+ String? packageNameContains,
});
/// Gets details for a single app.
Future getApp(String packageName, {bool includeIcon = false});
+ /// Gets installed apps by their exact [packageNames] without listing all apps.
+ ///
+ /// Returns each available package once, in order of its first occurrence.
+ /// Missing, hidden, and blank package names are skipped. An empty input returns
+ /// an empty list. Names are case-sensitive and are not trimmed.
+ /// Includes system apps and apps without a launcher entry when visible.
+ /// Set [includeIcons] to load icons alongside app metadata (default: false).
+ Future> getApps(List packageNames, {bool includeIcons = false});
+
+ /// Detects known framework library names in the base and installed split APKs.
+ ///
+ /// Returns unique matches in [AppFramework.values] order. An empty list means
+ /// no supported indicator was found after all APKs were read successfully.
+ /// Throws if [packageName] is blank, missing or hidden, or any APK cannot be
+ /// read. Does not inspect DEX code or determine the app's primary UI framework.
+ Future> detectAppFrameworks(String packageName);
+
/// Gets the app icon as PNG bytes without loading the full app metadata.
///
/// Returns null when the package is missing, not visible, or its icon resources
@@ -300,14 +345,6 @@ abstract class FlutterDeviceAppsPlatform extends PlatformInterface {
/// API 30, only installingPackageName is available. A returned model can have
/// null fields when Android does not provide the corresponding information.
Future getInstallSourceInfo(String packageName);
-
- /// Gets the installer store for the specified package name.
- ///
- /// Platform implementations should return the installer store for the given package.
- /// Returns the installer store name or null if not available.
- // Newly deprecated; retain the method for backwards compatibility.
- @Deprecated('Use getInstallSourceInfo() and its installingPackageName instead.')
- Future getInstallerStore(String packageName);
}
/// Default no-op implementation to throw if no platform is registered.
@@ -320,12 +357,21 @@ class _UnimplementedPlatform extends FlutterDeviceAppsPlatform {
bool onlyLaunchable = true,
bool includeIcons = false,
String? packageNamePrefix,
+ String? packageNameContains,
}) => Future.error(UnsupportedError('FlutterDeviceAppsPlatform not implemented'));
@override
Future getApp(String packageName, {bool includeIcon = false}) =>
Future.error(UnsupportedError('FlutterDeviceAppsPlatform not implemented'));
+ @override
+ Future> getApps(List packageNames, {bool includeIcons = false}) =>
+ Future.error(UnsupportedError('FlutterDeviceAppsPlatform not implemented'));
+
+ @override
+ Future> detectAppFrameworks(String packageName) =>
+ Future.error(UnsupportedError('FlutterDeviceAppsPlatform not implemented'));
+
@override
Future getAppIcon(String packageName) =>
Future.error(UnsupportedError('FlutterDeviceAppsPlatform not implemented'));
@@ -369,10 +415,4 @@ class _UnimplementedPlatform extends FlutterDeviceAppsPlatform {
@override
Future getInstallSourceInfo(String packageName) =>
Future.error(UnsupportedError('FlutterDeviceAppsPlatform not implemented'));
-
- @override
- // Newly deprecated; retain the method for backwards compatibility.
- @Deprecated('Use getInstallSourceInfo() and its installingPackageName instead.')
- Future getInstallerStore(String packageName) =>
- Future.error(UnsupportedError('FlutterDeviceAppsPlatform not implemented'));
}
diff --git a/pubspec.yaml b/pubspec.yaml
index f159559..2837f2f 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,11 +1,9 @@
name: flutter_device_apps_platform_interface
description: Platform-agnostic API contract for flutter_device_apps (federated).
-version: 1.0.0
+version: 1.1.0
repository: https://github.com/okmsbun/flutter_device_apps_platform_interface
issue_tracker: https://github.com/okmsbun/flutter_device_apps/issues
topics:
- - flutter
- - android
- installed-apps
- app-management
- package-manager
@@ -18,4 +16,4 @@ dependencies:
dev_dependencies:
lints: 6.1.0
- test: 1.32.0
+ test: 1.33.0
diff --git a/test/package_queries_test.dart b/test/package_queries_test.dart
index a41e529..66f7d9f 100644
--- a/test/package_queries_test.dart
+++ b/test/package_queries_test.dart
@@ -4,8 +4,13 @@ import 'package:test/test.dart';
void main() {
test('an unregistered platform still reports unsupported operations', () async {
final FlutterDeviceAppsPlatform platform = FlutterDeviceAppsPlatform.instance;
- await expectLater(platform.listApps(packageNamePrefix: 'com.example.'), throwsUnsupportedError);
+ await expectLater(
+ platform.listApps(packageNamePrefix: 'com.', packageNameContains: 'example'),
+ throwsUnsupportedError,
+ );
await expectLater(platform.getAppIcon('com.example.user'), throwsUnsupportedError);
+ await expectLater(platform.getApps(['com.example.user']), throwsUnsupportedError);
+ await expectLater(platform.detectAppFrameworks('com.example.user'), throwsUnsupportedError);
await expectLater(platform.isAppInstalled('com.example.user'), throwsUnsupportedError);
await expectLater(platform.isSystemApp('com.example.user'), throwsUnsupportedError);
await expectLater(platform.isAppEnabled('com.example.user'), throwsUnsupportedError);