apk_install 1.0.1 copy "apk_install: ^1.0.1" to clipboard
apk_install: ^1.0.1 copied to clipboard

PlatformAndroid

This is a toolkit for installing and updating APKs on the Android platform, used only for upgrading your own app.

apk_install #

apk install tools

Getting Started #

install_plugin #

pub package license

We use the apk_install plugin to install apk for android;

Usage #

To use this plugin, add apk_install as a dependency in your pubspec.yaml file. For example:

dependencies:
  apk_install: '^1.0.1'

Android #

You need to request permission for READ_EXTERNAL_STORAGE to read the apk file. You can handle the storage permission using flutter_permission_handler.

 <!-- read permissions for external storage -->
 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

In Android version >= 8.0 , You need to request permission for REQUEST_INSTALL_PACKAGES to install the apk file

<!-- installation package permissions -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

In Android version <= 6.0 , You need to request permission for WRITE_EXTERNAL_STORAGE to copy the apk from the app private location to the download directory

<!-- write permissions for external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Example #

install apk from the internet

 installApk() async {
  final check = await ApkInstall().onCheckInstallApkPermission();
  final state = await ApkInstall().onInstallApk(apkPath);
 }
0
likes
160
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

This is a toolkit for installing and updating APKs on the Android platform, used only for upgrading your own app.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on apk_install

Packages that implement apk_install