Flutter Device apps plugin #
A plugin to get the list of installed applications (iOS is not supported yet).
Getting Started #
First, you have to import the package in your dart files with:
List of installed applications #
To get the list of the apps installed on the device:
List<Application> apps = await DeviceApps.getInstalledApplications();
You can filter system apps if necessary. Note: The list of apps is not ordered!
Get apps with launch intent #
You can now get only those apps with launch intent by using the following option. Also add
includeSystemApps option to get all the apps that have launch intent.
// Returns a list of only those apps that have launch intent List<Application> apps = await DeviceApps.getInstalledApplications(onlyAppsWithLaunchIntent: true, includeSystemApps: true)
Get an application #
To get a specific app by package name:
Application app = await DeviceApps.getApp('com.frandroid.app');
Check if an application is installed #
To check if an app is installed (via its package name):
bool isInstalled = await DeviceApps.isAppInstalled('com.frandroid.app');
Open an application #
To open an application
Displaying app icon #
When calling the
getApp() methods, you can ask for the icon.
To display the image, just call:
[1.0.9] - 13th December 2019
- Add path to APK file (PR #16)
- Add install and update time fields (PR #18)
- Add a missing break statement when opening the app
- Fix warnings in the code
[1.0.8] - 29th May 2019
- Fix issue #11 (>= Flutter 1.6)
[1.0.7] - 3rd April 2019
- The version code is now available in the Dart code
[1.0.6] - 21th February 2019
- For each application, you have now access to the "data directory" path (thanks to Ryan Gonzalez)
[1.0.5] - 21th January 2019
- Some tests apps does not have a version_name. From now on, the plugin will just ignore them
[1.0.4] - 27th December 2018
- Ability to filter only launchable apps (thanks to Damodar Lohani)
[1.0.3] - 17th December 2018
- Some asserts added + a different class is used when an icon is passed
[1.0.2] - 15th December 2018
- Support for the application icon (thanks to Damodar Lohani)
- Fetching the applications list is now processed in a background thread in the Android code
[1.0.1] - 30th October 2018
- New attribute to detect whether the app is user or system
[1.0.0] - 6th June 2018
- Initial release (support for Android only)
Demonstrates how to use the device_apps plugin.
Getting Started #
For help getting started with Flutter, view our online documentation.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: device_apps: ^1.0.9
2. Install it
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Feb 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.1
- pana: 0.13.5
- Flutter: 1.12.13+hotfix.7
Health issues and suggestions
Document public APIs. (-1 points)
20 out of 20 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.