0

How could I get all applications that were installed by user?

I want to develop an app that can present all applications that were installed by user, but

I don't understand how to get them.

use getExternalStorageDirectory()?

or is there have other method?

Marcin Koziński
  • 10,835
  • 3
  • 47
  • 61
余浩宇
  • 1
  • 1
  • I assume this is Android, by that function name? Please tag it. What you're asking is very much different on a Windows machine, or on a Mac box, or on a Symbian phone. – Amadan Jul 27 '12 at 04:54
  • 1
    perhaps reading this question- answer may help you http://stackoverflow.com/questions/2695746/how-to-get-a-list-of-installed-android-applications-and-pick-one-to-run – silent_coder14 Jul 27 '12 at 05:03

1 Answers1

0

Try This:

 final Intent intent= new Intent(Intent.ACTION_MAIN, null);
 intent.addCategory(Intent.CATEGORY_LAUNCHER);
 final List mylist= context.getPackageManager().queryIntentActivities(intent, 0);
Yash
  • 1,751
  • 13
  • 14