Hello all,
How can I get the version information of the current installed apps on my
phone.
If I do :
PackageManager packageManager = getPackageManager();
List<PackageInfo> packs = packageManager.getInstalledPackages(0);
int size = packs.size();
apps += "\nTotal apps = "+ size+"\n";
for (int i = 0; i < size; i++)
{
PackageInfo p = packs.get(i);
apps += "\nApp name: " +
p.applicationInfo.loadLabel(packageManager).toString();
apps += "\nPackage name: " + p.packageName;
apps += "\nVersion name: " + p.versionName;
apps += "\n";
}
tv.setText("Installed apps:\n"+apps);
I get all the apps currently installed.
I wasn't able to figure out how to extract their correspondent version
information.
Any suggestions?
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en