public void getAllRunningProcess() {
int flags = PackageManager.GET_META_DATA
| PackageManager.GET_SHARED_LIBRARY_FILES
| PackageManager.GET_UNINSTALLED_PACKAGES;
List<ApplicationInfo> applications = pm.getInstalledApplications(flags);
for (ApplicationInfo appInfo : applications) {
if ((appInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
// System application
} else {
// Installed by user
appList.add(appInfo);
adapter = new CustomAdapter(ctx, appList);
list_view.setAdapter(adapter);
}
}
}
IT will return you list of applist which you have installed.
int flags = PackageManager.GET_META_DATA
| PackageManager.GET_SHARED_LIBRARY_FILES
| PackageManager.GET_UNINSTALLED_PACKAGES;
List<ApplicationInfo> applications = pm.getInstalledApplications(flags);
for (ApplicationInfo appInfo : applications) {
if ((appInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
// System application
} else {
// Installed by user
appList.add(appInfo);
adapter = new CustomAdapter(ctx, appList);
list_view.setAdapter(adapter);
}
}
}
IT will return you list of applist which you have installed.
No comments:
Post a Comment