Getting List of Installed Applications in Android

출처 :

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

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

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

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

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

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *