This works for my own package, you can try for others:

            try {
                packageInfo = packageManager.getPackageInfo(packageName,
                        PackageManager.GET_META_DATA);

                int versionCode = *packageInfo.versionCode*;
            } catch (NameNotFoundException x) {
            }

-- Kostya

30.11.2010 22:01, Nathan ?????:
This is probably obvious to the rest of you, but I'm getting a bit
lost.

I've been using the PackageManager to check whether another app is
installed.

Can I use it to check the version number of that other app?

Thanks for any tips.

Nathan



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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

Reply via email to