There is multiple ways to get installed application information like PackageInfo and ApplicationInfo.
In this tutorial I will show both way to get All installed applications.
Step 1:- get Package Manager Instance.
PackageManager packageManager = getPackageManager();
Step 2:- Get all installed apps as PackageInfo's list
List<PackageInfo> allApps = packageManager.getInstalledPackages(PackageManager.GET_META_DATA);
Step 3:- Get all installed apps using ApplicationInfo's list.
List<ApplicationInfo> info = packageManager.getInstalledApplications(0);
Step 4:- You can get ApplicationInfo instance from Packageinfo like below:-
ApplicationInfo applicationInfo = packageInfo.applicationInfo;
5. Now you can get information about app like :-
packageName
App name
Version Code
Version Name,
APK path ,
Data Directory
App Icon
App Logo
Happy Coding :)
0 Comment(s)