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?
Asked
Active
Viewed 68 times
-3
-
What do you mean by apps? Please make your question clear. – Anis LOUNIS aka AnixPasBesoin Aug 23 '15 at 17:28
-
@MarcinOrlowski I tried something, but nothing worked... I deleted the code I have written before. – Shahnur Isgandarli Aug 23 '15 at 17:42
-
@AnixPasBesoin I mean the apps on your phone. – Shahnur Isgandarli Aug 23 '15 at 17:43
-
1Possible duplicate of [Get list of installed android applications](http://stackoverflow.com/questions/6165023/get-list-of-installed-android-applications) – petey Jan 03 '17 at 19:43
1 Answers
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.

Anis LOUNIS aka AnixPasBesoin
- 4,765
- 5
- 32
- 61