Getting List of Installed Applications in Android

We can get the list of android applications that is installed in the android device through PacketManager and using the API queryIntentActivities(). To get the list of installed applications in the device,

The complete code snippet is,

public class AppList extends Activity {
private ListView lView;
private ArrayList results = new ArrayList();

public void onCreate(Bundle savedInstanceState) {
lView = (ListView) findViewById(;
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
lView.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, results));

The screenshot is,


Post a Comment

Popular posts from this blog

Open Gallery and get the selected image in appplication

Dismiss or Cancel dialog by swipe gesture

AlarmManager and Notification in Android