Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6871119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:45:59+00:00 2026-05-27T03:45:59+00:00

I would like to implement a check in my application to tell the user

  • 0

I would like to implement a check in my application to tell the user when I have distributed a new version out on android markets. Any ideas of an easy and good way to implement this check?

Update This is how i resolved it:

private static int getManifestVersionCode(Activity activity) {
    try {
        PackageInfo pinfo = activity.getPackageManager().getPackageInfo(activity.getPackageName(), 0);
        return pinfo.versionCode;
    } catch (NameNotFoundException e) {
    }
    return 0;
}

private static int getRemoteVersionCode() {
    BufferedReader reader = null;
    try {
        URL url = new URL("http://myserver.com/my_version_code.html");
        reader = new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"));
        String line = reader.readLine();
        return Integer.parseInt(line); 
    }catch (Exception e) {
    }finally {
        if (reader != null){ 
            try { 
                reader.close(); 
            } catch (IOException logOrIgnore) {
            }
        }
    }
    return 0;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:46:00+00:00Added an answer on May 27, 2026 at 3:46 am

    The User is already notified about updates when they use the Market application.

    But if you insist on having another method in your application the easiest thing to do would be to have an Asynchronous call from the application to a remote server where the application version is compared to the current version.

    Update:
    If you rely on screen scraping then if Google were to change the page you’re update check wouldn’t work. In which case the users won’t be alerted. So for that reason I think it’s best if you host the server side part yourself, if you can pay for the server. You could do it another way (which I don’t really like) but it’s free, store a public html file on something like dropbox which the app can read the from and then you can scrape the html. Since it’s your html page you won’t have an issue of the page changing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to implement a command line interface for a Java application. This
I would like to implement the method User.calculate_hashed_password . I'm trying to use the
I'm building a mobile application using jQuery Mobile and I would like to implement
I would like to implement something similar to a c# delegate method in PHP.
I would like to implement a data access object pattern in C++, but preferably
I would like to implement an interactive evolutionary algorithm for generating music (probably just
I would like to implement a producer/consumer scenario that obeys interfaces that are roughly:
I would like to implement a post build event that performs the following actions
I would like to implement something similar to 37Signals's Yellow Fade effect. I am
We would like to implement a web form that automatically saves content at regular

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.