简体   繁体   中英

Retrieve and Display Installed Android Apps

I want to create an android code that can retrieve all installed apps in my device and display them with icons in a good format. How do I display the list of apps installed in the system with a good layout?

  1. You might need to learn about ListView : http://developer.android.com/guide/topics/ui/layout/listview.html

  2. To get a list of all installed apps, you can follow this link: How to get a list of installed android applications and pick one to run

  3. Try putting the list of all apps in your ListView

  4. To get app icon, after you get the list of all apps, you will also get their package names - follow this link: How can I get the application's icon from the package name?

Use PackageManager to get all details of installed packages

 PackageManager packageManager = getPackageManager();
 List apps = packageManager.getInstalledApplications(PackageManager.GET_META_DATA);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM