about uscontact

Getting List of Installed Applications in Android

Author: zemna
Date: April 17, 2021
Share this:

출처 : http://androidboss.com/getting-list-of-installed-applications-in-android/

방법1. PackageManager.queryIntentActivities() 함수 이용

[code language="java"] public class AppList extends Activity {

@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); PackageManager pm = this.getPackageManager();

Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(Intent.CATEGORY_LAUNCHER);

List list = pm.queryIntentActivities(intent, PackageManager.PERMISSION_GRANTED); for (ResolveInfo rInfo : list) { Log.w(“Installed Applications”, rInfo.activityInfo.applicationInfo.loadLabel(pm).toString()); } } } [/code]

Share this:

Leave a Reply

Your email address will not be published.

ZEMNA.NET

Professional software development agency estalished in Indonesia. We offers website setup, web application development, fulfillment service, and etc.
Follow us
Follow us to get latest news and tutorials.
2022 - Copyright, All Rights Reserved, Made by ZEMNA.NET with ❤️
magnifiercrossmenu