Code Monkey home page Code Monkey logo

installed_apps's Introduction

Installed Apps

The Installed Apps plugin for Flutter provides utility methods related to installed apps on a device.

Currently, only Android is supported.

Getting Started

  1. Installation Guide
  2. Example Project

Usage

Get List of Installed Apps

List<AppInfo> apps = await InstalledApps.getInstalledApps(
	bool excludeSystemApps,
	bool withIcon,
	String packageNamePrefix
);

Use packageNamePrefix to filter apps with package names starting with a specific prefix.

Get App Info with Package Name

AppInfo app = await InstalledApps.getAppInfo(String packageName);

AppInfo model class

class AppInfo {
  String name;
  Uint8List? icon;
  String packageName;
  String versionName;
  int versionCode;
  BuiltWith builtWith;
  int installedTimestamp;
}

Start App with Package Name

InstalledApps.startApp(String packageName);

Open App Settings Screen with Package Name

InstalledApps.openSettings(String packageName);

Check if App is a System App

bool isSystemApp = await InstalledApps.isSystemApp(String packageName);

Uninstall App

bool uninstallIsSuccessful = await InstalledApps.uninstallApp(String packageName);

Check if App is Installed

bool appIsInstalled = await InstalledApps.isAppInstalled(String packageName);

I'm always working on making improvements. If you have any feedback, issues, or suggestions, feel free to reach out. Happy coding!

installed_apps's People

Contributors

ranjeetrocky avatar sharmadhiraj avatar sjohnson12886 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

installed_apps's Issues

Cannot get installed app by prefix on Android 11

After updating to Android 11 on my device, InstalledApps.getInstalledApps(false, false, myPrefix) is empty for myPrefix. Before the update, it worked and yielded the correct app(s) with the given prefix. The update was the only change on the device, no apps have been removed or changed.

BinaryMessenger? but BinaryMessenger was expected

.pub-cache/hosted/pub.dartlang.org/installed_apps-1.3.0/android/src/main/kotlin/com/sharmadhiraj/installed_apps/InstalledAppsPlugin.kt: (39, 41): Type mismatch: inferred type is BinaryMessenger? but BinaryMessenger was expected

installation guid link didnt work and rediret to pub.dev

look like the source i had wite an function to get apps but that gives me
Exception has occurred.
MissingPluginException (MissingPluginException(No implementation found for method getInstalledApps on channel installed_apps))
my code is this
class AppController extends GetxController {
List appInstalled = [];
@OverRide
void onInit() async {
super.onInit();
devloper.log('|ON IN IT HAD CALLED|');
appInstalled = await InstalledApps.getInstalledApps(true, true);
update();
}
}

Uint8List

I'm having trouble showing the icon(Uint8List) in the format they provide

uninstallApp doesn't seem to work

Hi,

The uninstallApp function returns true directly on the confirmation dialog.
At that point, the app isn't uninstalled yet (the user hasn't even confirmed it yet).

Flow should probably be something like this:

  • Open the confirmation dialog.
  • If user cancels return false.
  • If user presses "OK". Wait for the app to be really uninstalled, then return true. Sometimes after pressing "OK" the uninstallation can be unsuccessful so there needs to be a check for this.

Regards,

build.gradle file missing namespace

For projects using AGP > 8.2, all build.gradle files(including ones in plugins) are required to have a namespace. If a namespace is missing in any plugin, the following error is seen

Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.