apk_admin 1.0.2 copy "apk_admin: ^1.0.2" to clipboard
apk_admin: ^1.0.2 copied to clipboard

outdated

A Flutter plugin for launching, installing from backup, uninstalling and sharing android apps and more!.

APK Admin Plugin for Flutter #

A Flutter plugin for launching, installing from backup, uninstalling and sharing android apps and more!.

Pub

Getting Started #

add apk_admin as a dependency in your pubspec.yaml file.

dependencies:
  flutter:
    sdk: flutter
  apk_admin: 1.0.0

Next, import 'apk_admin.dart' and initialize the plugin:

import 'package:apk_admin/apk_admin.dart';

ApkAdmin apkAdmin = ApkAdmin();

List of installed applications #

To get a list of all apps installed on the device:

// App is a custom class created by the plugin and it contains
// packageName, versionName, decodedIcon, installDate and lastUpdateDate.
// this method takes three parameters:
// bool includeSystemApps => default value is false
// bool onlyIncludeAppsWithLaunchIntent => default value is true
// bool includeAppIcon => default value is false
// To show the app icon set includeAppIcon to true and use Image.network(decodedIcon).

List<App> apps = await apkAdmin.getInstalledApps();

Launch app #

// Result retrieved from this method call tells you where the app was launched.

String launchResult = await apkAdmin.launchApp("packageName");

Uninstall app #

await apkAdmin.uninstallApp("packageName");

Make backup #

To make an apk backup of an app by its packageName:

// if the WRITE_EXTERNAL_PERMISSION is not granted
// the method will ask the user for his permission automatically.
// Result retrieved from this method call tells you whether the backup process
// completed successfully, failed or the WRITE_EXTERNAL_PERMISSION is required
// and method should be called again after the permission is granted. 

String backupResult = await apkAdmin.backupApp("packageName");

Get backups #

To get a list of all stored backups on the device:

// All backups gets stored in your app file directory
// under a sub directory called "backups"
// for example if your app package name is com.example.name them backups will be
// stored under /storage/emulated/0/Android/data/com.example.name/files/backups .

await apkAdmin.getBackups("packageName");

Install an app from backup #

// You can get apkPath from the map retrieved by calling getBackups method.

await apkAdmin.installAppFromBackup("apkPath");

share app via bluetooth #

 await apkAdmin.shareAppViaBluetooth("packageName");

Showcase #

Installed Apps Backups

Example #

for a complete example please refer to this link

Issues and pull requests #

If you found any bug please file a new issue here and if you want to request a new feature feel free to make a request here.

35
likes
40
points
58
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for launching, installing from backup, uninstalling and sharing android apps and more!.

Homepage

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on apk_admin