thanks hackborn it works.

On Aug 17, 8:49 pm, Dianne Hackborn <[email protected]> wrote:
> If you want this from the desktop, use "aapt dump badging <path/to/apk>".
>
> On Mon, Aug 17, 2009 at 7:24 AM, Greivin Lopez <[email protected]>wrote:
>
>
>
>
>
>
>
> > 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.
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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