@ Frazerm63 I think you are missing this thing in your code.
Intent localIntent = new Intent("android.intent.action.MAIN", null); localIntent.addCategory("android.intent.category.LAUNCHER"); List localList = localPackageManager.queryIntentActivities(localIntent, 0); Collections.sort(localList, new ResolveInfo.DisplayNameComparator(localPackageManager));
you need to pass your PackageManager object in the above code .means this localPackageManager
I donโt really understand how you can use this in user code, but it will help you understand how to filter only any category application.
Herry source share