Horje
how to find all apps on android device using java Code Example
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() 




Java

Related
variable cannot be dereferenced java Code Example variable cannot be dereferenced java Code Example
mostrar todos los elementos de un arraylist java Code Example mostrar todos los elementos de un arraylist java Code Example
prevent creating instance of singleton from thread Code Example prevent creating instance of singleton from thread Code Example
setCookie("showPopupBannerBeta", 1, 1 Code Example setCookie("showPopupBannerBeta", 1, 1 Code Example
android foreground services set auto cancel not working Code Example android foreground services set auto cancel not working Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7