I am trying to retrieve a list of apps that are installed
on the phone/emulator. I am using the following snippet to return the list of apps, however, it is returning null
. Do I have to add some permission in Android Manifest
or am I missing something else?
pManager = getPackageManager();
List<ApplicationInfo> appList =pManager.getInstalledApplications(PackageManager.GET_META_DATA);
if(appList == null)
System.out.println("null");