sample code to Display all installed applications in Our Device in Android

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

              for (ApplicationInfo packageInfo : packages) {

                  Log.d("TAG", "Installed package :" + packageInfo.packageName);
                      System.out.println("*****s/w installed");
                          "Launch Activity :"
                                  + pm.getLaunchIntentForPackage(packageInfo.packageName));

              }// the getLaunchIntentForPackage returns an intent that you can use with startActivity()


Popular posts from this blog

Custom Dialog with no title and full screen in Android

code to display .pdf,.text,.DOC,.DOCX,.doc extension files exists in SDCard

Best working code to set Date limits on Date Picker Dialog,in Android