I have the code which lists all the installed applications:
final PackageManager pm = getPackageManager();
//get a list of installed apps.
List<ApplicationInfo> packages = pm
.getInstalledApplications(PackageManager.GET_META_DATA);
for (ApplicationInfo packageInfo : packages) {
Log.d("Tag", "Installed package :" + packageInfo.packageName);
}
How do I differentiate between system apps and apps installed from the market? I guess I figured the unconventional method of searching for “android” in the package name and mark it as a system app. Is there a conventional way for me to find only third-party(from the Market) apps?
You could call getInstallerPackageName() on all the packages you’ve retrieved. While this can be tampered with, it should be sufficient for your purposes.
You could also use something like: