My Blog List

Wednesday 22 August 2012

How to get Installed packages List in Android

Hi, folks
This quick post is related to grab the app information installed on to your device.

Here is sample method  on button clicked..


 public void getInstalledPackage(View view)
{
Log.d("Clicked", " button Clicked");
             PackageManager pm = getPackageManager();
//get a list of installed apps.
        List<ApplicationInfo> packages = pm
                .getInstalledApplications(PackageManager.GET_META_DATA);
                // iterate over the list.
        for (ApplicationInfo packageInfo : packages) {
                           // print package name.
            Log.d("package name" , packageInfo.packageName);

        }
      }
that's all  
open your log cat and you can see the result
pretty cool  is'nt?


for any query just mail me @ bpsingh216@gmail.com

No comments:

Post a Comment