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 722663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:00:59+00:00 2026-05-14T06:00:59+00:00

I’m developing an application that will be available from a website (market probably as

  • 0

I’m developing an application that will be available from a website (market probably as well). The problem I’m having at the moment is how to handle the updates to the app. I know how to check the version against the current one and I know if I need to update it. Question is…how?

Is there a way I can download an APK from the website and start the install process? The user will have to confirm of course, but I just want to be able to start it for him. At the moment I’m doing this:

private void doUpgrade() {
    // TODO Auto-generated method stub
    Builder builder = new AlertDialog.Builder(this);
    builder.setTitle(getString(R.string.upgrade));
    builder.setIcon(R.drawable.help);
    builder.setMessage(getString(R.string.needUpgrade));
    builder.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {

        @Override
        public void onClick(DialogInterface dialog, int which) {
            // TODO Auto-generated method stub

            Map<String, String> data = new HashMap<String, String>();

            try {
                HttpResponse re = Registration.doPost("http://www.android-town.com/appRelease/AndroidTown.apk",data);

                int statusCode = re.getStatusLine().getStatusCode();
                closeApp();

            } catch (ClientProtocolException e) {
                e.printStackTrace();
                Toast.makeText(getApplicationContext(), getString(R.string.noURLAccess), Toast.LENGTH_SHORT).show();
                closeApp();
            } catch (IOException e) {
                e.printStackTrace();
                Toast.makeText(getApplicationContext(), getString(R.string.noURLAccess), Toast.LENGTH_SHORT).show();
                closeApp();
            }
        }
    });
    builder.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {

        @Override
        public void onClick(DialogInterface dialog, int which) {
            // TODO Auto-generated method stub
            dialog.cancel();
            closeApp();
        }
    });
    builder.show();
}

But it doesn’t really do anything…should I open a webView with the URL? A new runnable thread? Any other way? Please help 🙂

Cheers

  • 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-14T06:00:59+00:00Added an answer on May 14, 2026 at 6:00 am

    Easiest is just to launch an Intent to open the download URL in the Browser. This will download the APK and the user can then install it by clicking on it in the download manager.

    You are saying that this will handle OTA separate to the market so the user should already have disabled “Allow apps from non-Market sources” when they initially installed your app.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am currently running into a problem where an element is coming back from
I need a function that will clean a strings' special characters. I do NOT
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into

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.