-3

I want to access the names of android apps whenever I open any of them, and send them to the cloud. Is it possible to retrieve the information about apps from the system? If yes, how can I do this?

Milad Nouri
  • 1,587
  • 1
  • 21
  • 32

1 Answers1

1

First check this link to better understand the ResolveInfo class.

Then try this code:

final Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
final List appsList = context.getPackageManager().queryIntentActivities( intent, 0);

You will get all the necessary data in the ResolveInfo.