Create list of all installed apps
1. This post describes how to create an app which shows a list of all installed apps. 2. In main.xml add a RecyclerView. 3. Switch on AppCompat and design. 4. Create a custom view recycler_item.xml . In this put an ImageView imageview1 , and put three TextViews text_label , text_package , and text_category . 5. For RecyclerView select recycler_item.xml as Custom View. 6. Create a Map List maplist . 7. Add following imports . import android.content.pm.PackageManager; import android.content.pm.ApplicationInfo; 8. In onCreate , get all apps and add to maplist. PackageManager pm = this.getPackageManager(); List<ApplicationInfo> apps = pm.getInstalledApplications(PackageManager.GET_META_DATA); for (ApplicationInfo ai : apps) { int category = ApplicationInfo.CATEGORY_UNDEFINED; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { category = ai.category; } HashMap<String, Object> map = new HashMap<>(); ...