Shai
Shai

Reputation: 569

Implicit intent call scan

I am new to Android development. And I am trying build an app which scans all installed Apps for implicit intend calls. So if an application has implicit call then this app shows the name of the apps. Can someone provide me some concept on how to do it? If this not possible, then is it possible to notify when application gets called implicitly?

Upvotes: 0

Views: 114

Answers (1)

Lalith B
Lalith B

Reputation: 12239

You can get a list of all installed apps by querying the PackageManager and also get the Launch Intent for each package. (That is the packages with category Intent.CATEGORY_LAUNCHER

final PackageManager pm = getPackageManager();
//get the list of all installed packages.
List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);

for (ApplicationInfo packageInfo : packages) {
    Log.d(TAG, "Installed package :" + packageInfo.packageName);
    Log.d(TAG, "Launcher Activity :" + pm.getLaunchIntentForPackage(packageInfo.packageName)); 
}

Upvotes: 1

Related Questions