Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to get app categories android packagemanager

PackageManager pm = context.getPackageManager();
ApplicationInfo applicationInfo = pm.getApplicationInfo(packageName, 0);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
    int appCategory = applicationInfo.category;
    String categoryTitle = (String) ApplicationInfo.getCategoryTitle(context, appCategory)
    // ...
}
Comment

PREVIOUS NEXT
Code Example
Java :: java.lang.SecurityException: Permission Denial: reading androidx.core.content.FileProvider 
Java :: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:251) 
Java :: treemap java entryset 
Java :: java swing border 
Java :: how to recognize a pressed key in java 
Java :: contient java 
Java :: spring boot api key authentication example 
Java :: Java Hashmap Replace Elements 
Java :: can a java class have more than 108 constructors 
Java :: difference between linkedlist and arraylist 
Java :: string java 
Java :: spring boot embedded tomcat port already in use 
Java :: all possible substrings of a string java of specific length 
Java :: change fab image programatically 
Java :: java try...catch 
Java :: java double to string fixed precision 
Java :: sharedpreferences 
Java :: stringbuilder java setlength 
Java :: Traversing through java map foreach 
Java :: run java file 
Java :: exception class implementation in java 
Java :: java switch tutorial 
Java :: maths trivia in java 
Java :: Java Method Create Basic 
Java :: java float data type 
Java :: Java Create a BufferedReader 
Java :: add string to array java 
Java :: can we serialize class in java 
Java :: java array 
Java :: for loop in java 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =