Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to find all apps on android device using java

final PackageManager pm = getPackageManager();
//get a list of installed apps.
List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);

for (ApplicationInfo packageInfo : packages) {
    Log.d(TAG, "Installed package :" + packageInfo.packageName);
    Log.d(TAG, "Source dir : " + packageInfo.sourceDir);
    Log.d(TAG, "Launch Activity :" + pm.getLaunchIntentForPackage(packageInfo.packageName)); 
}
// the getLaunchIntentForPackage returns an intent that you can use with startActivity() 
Comment

PREVIOUS NEXT
Code Example
Java :: split() String android 
Java :: merced A class 
Java :: Get Max Value Element From List With Objects 
Java :: android dynamically create layer-list with item and shape site:stackoverflow.com 
Java :: Designing a HashMap Key 
Java :: jdbc outside of ide 
Java :: java webelement how to double click 
Java :: java png obj animate image size 
Java :: How to convert Javascript return value to String in Android 
Java :: jdned 
Java :: convert code python to java 
Java :: java tcp readline not working 
Java :: java importieren 
Java :: aspectj after returning 
Java :: leetcode egg drop 
Java :: java notnull returns null 
Java :: subtract two variables in java 
Java :: how to add data json jaca 
Java :: Based on the method exampleMethod, what is the return type of the method? 
Java :: how to return custom value in api spring boot 
Java :: control statements 
Java :: intellij evaluate expression 
Java :: castle stones java qn 
Java :: spring boot return 201 created 
Java :: android loop through string array 
Java :: electron driver window maximize selenium webdriver 
Java :: classloader in static method 
Java :: java code to input non blank string 
Java :: java int data type 
Java :: How to Register a Custom Auto-Configuration? 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =