4

i want to check the current version of my app in the market and compare it with the current running version.

this code will retrive the version of my running app:

PackageManager m = androidContext.getPackageManager();
String app_ver = m.getPackageInfo(androidContext.getPackageName(), 0).versionName;

how i can retrive the version in the market?

thanks!

silly
  • 7,789
  • 2
  • 24
  • 37

1 Answers1

3

There's no native way of querying the Android Market site for an app's version.

You could, of course, write an html parser that goes through the Android Market site and retrieves your app version, but it won't be worth it (performance wise). Here's a similar Stack Overflow question you can read through.

Community
  • 1
  • 1
Marvin Pinto
  • 30,138
  • 7
  • 37
  • 54
  • Thanks for your answer... i extend my RESTfull service with a Version checker (Extract the versionnumber from my APK on the service). – silly Mar 01 '12 at 06:59