Android ships with a number of content providers that store common data such as contact information, calendar information, and media files. These classes offer simplified methods of adding or retrieving data from these content providers. If you need to list all the installed providers, for debugging and other purposes, use the following code:

for (PackageInfo pack : context.getPackageManager().getInstalledPackages(PackageManager.GET_PROVIDERS)) {
  ProviderInfo[] xproviders = pack.providers;
  if (xproviders != null) {
    for (ProviderInfo provider : xproviders) {
      Log.d("Providers", "provider: " +", "+provider.processName);
      Log.d("Providers", " " + provider);
      Log.d("Providers", " app " + provider.applicationInfo);

Click here to download the functional demo from Google Play


Pin It on Pinterest

Share This