views:

33

answers:

1

I want to know how to implement java code to parse the apk file, get the android application version number and so on, such as after you uploaded android application in Android Market, it will get the version number, permissions.

Anyone can give me idear? Thanks a lot.

A: 
     PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_META_DATA); 
     version = pInfo.versionName.toString(); 
franklins
Thank you for your reply. My meaning is access AndroidManifest.xml form Android platform. Such as a web project.
The PackageInfo object should have all the information in the Manifest file. http://developer.android.com/reference/android/content/pm/PackageInfo.html
franklins
did u get ur answer? If so post it.
franklins