Answers for "get all apps in device in android"

0

how to find all apps on android device using java

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

for (ApplicationInfo packageInfo : packages) {
    Log.d(TAG, "Installed package :" + packageInfo.packageName);
    Log.d(TAG, "Source dir : " + packageInfo.sourceDir);
    Log.d(TAG, "Launch Activity :" + pm.getLaunchIntentForPackage(packageInfo.packageName)); 
}
// the getLaunchIntentForPackage returns an intent that you can use with startActivity()
Posted by: Guest on August-04-2021

Code answers related to "get all apps in device in android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language