Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PackageManager pm = getPackageManager();
- List<ApplicationInfo> apps = pm.getInstalledApplications(0);
- List<ApplicationInfo> installedApps = new ArrayList<ApplicationInfo>();
- for(ApplicationInfo app : apps) {
- if((app.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) == 1) {
- installedApps.add(app);
- } else if ((app.flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
- } else {
- installedApps.add(app);
- }
- }
- if ("Remove".equals(n.getAttributes().item(0).getNodeValue())) {
- String removeAPK = n.getFirstChild().getNodeValue();
Add Comment
Please, Sign In to add comment