Which of the following functions will return all available Content Providers?
Correct Answer: List<ProviderInfo> returnList = new ArrayList<ProvderInfo>(); for (PackageInfo pack : getPackageManager().getInstalledPackages(PackageManager.GET_PROVIDERS)) { ProviderInfo[] providers = pack.providers; if (providers != null) { returnList.addAll(Arrays.asList(providers)); } } return returnList;
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Android Programming MCQ Questions