0

How do I get list of installed apps Android Studio?

Rosy
  • 17
  • 3
  • 2
    "I was told to get a list of all apps installed on the device without using PackageManager" - That's a ridiculous restriction. What's the point of that? – Mike M. Jun 22 '16 at 05:37
  • Are you sue that you are prohibited to use `getPackageManager()`? And, are you asked to do it for rooted devices only? – Sufian Jun 22 '16 at 06:05
  • Sorry..I got it wrong ..It was not without using but instead by creating a new class and inheriting it. – Rosy Jun 22 '16 at 07:18

1 Answers1

0

Without using PackageManager here is what you can get

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

and this only shows application that are preinstalled or can run the ACTION_MAIN Intent type.

Hope it helps.

Abdullah
  • 935
  • 9
  • 18