android_package_installer
0.0.3, released 2 years ago by code.meydanca.com
A Flutter plugin for installing Android packages from APK files.
What it does
A Flutter plugin that uses the native Android Package Installer to install applications directly from an APK file. It returns a status code representing the installation outcome and requires a minimum API level of 21.
AI-written summary of version 0.0.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to install APK files programmatically within an Android app
- You are building a custom in-app updater or app store client for Android
Skip it when
- You are targeting iOS or platforms other than Android
- You want a fully managed store distribution update without manual APK management
Strengths
- Direct integration with the Android Package Installer
- Provides status codes for installation results
Weaknesses
- Android-only platform support
- Requires manual native configuration (permissions, FileProvider, XML paths)
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Requires adding permissions (REQUEST_INSTALL_PACKAGES, READ_EXTERNAL_STORAGE, MANAGE_EXTERNAL_STORAGE) to AndroidManifest.xml, setting up an intent filter, configuring a FileProvider, and creating a file_paths.xml resource.
import 'package:android_package_installer/android_package_installer.dart';
int? statusCode = await AndroidPackageInstaller.installApk(apkFilePath: '/sdcard/Download/com.example.apk');
if (statusCode != null) {
PackageInstallerStatus installationStatus = PackageInstallerStatus.byCode(statusCode);
print(installationStatus.name);
}Alternatives
Packages that do the same job and could replace android_package_installer.
- app_installer
Plugin to open app stores, editor reviews, and install APK files on Android and iOS.
53Compare - flutter_app_installer
A app installer plugin, supports for installing apk with intent or silently on Android devices.
46Compare - flutter_app_update
A simple lightweight and customizable version update library for Flutter
61Compare - nearby_connections
Android plugin for offline peer‑to‑peer data transfer using the Nearby Connections API.
58Compare
Works with
Packages commonly used together with android_package_installer: ones it builds on, ones built on it, and its own family.