Hi, you could use PackageInfo class to retrieve some information from
Manifest.xml.

Try to use this code:
    /**
     * Gets the software version retrieved from the Manifest.
     */
    private String getSoftwareVersion() {
        try {
                PackageInfo packageInfo = getPackageManager
().getPackageInfo(getPackageName(), 0);
                return packageInfo.versionName;
        } catch (PackageManager.NameNotFoundException e) {
                Log.e(TAG, "Package name not found", e);
        };
    }

On Aug 16, 4:30 am, engin <[email protected]> wrote:
> Hi, can I get version from .apk file. I tried to open
> androidmanifest.xml but I realized that xml files are destructed when
> apk created.

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