how to get app categories android packagemanager

Solutions on MaxInterview for how to get app categories android packagemanager by the best coders in the world

showing results for - "how to get app categories android packagemanager"
Charline
10 May 2017
1PackageManager pm = context.getPackageManager();
2ApplicationInfo applicationInfo = pm.getApplicationInfo(packageName, 0);
3if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
4    int appCategory = applicationInfo.category;
5    String categoryTitle = (String) ApplicationInfo.getCategoryTitle(context, appCategory)
6    // ...
7}