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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:07:37+00:00 2026-05-16T18:07:37+00:00

I am having problem with download my android application from my own web server.

  • 0

I am having problem with download my android application from my own web server.

First I sent a html content with java script to ask Android phone to open my download link

<html>
    <head>
        <script>
            window.onload=function()
            {{
                window.location = "downloadURL";
            }}
        </script>
    </head>
</html>"

Android phone revice this java script will open the downloadURL

On my server end, I am using .Net ASP

I’ve set up the MIME content

Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.android.package-archive";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + "MyApp.apk");
Response.AppendHeader("Content-Length", "" + response.Application.Bytes.Length);
Response.BinaryWrite(response.Application.Bytes);

The apk file which is MyApp.apk is about 1.5MB

How ever, when I used Android emulator to download the app, the file size is only 4.25 KB, and the name is not MyApp.apk. It contains the name of my download link.

alt text

When I use Firefox to download my app, Firefox successfully download it with correct name and size.
alt text
Please help me out!!
Thanks

When I debug my server, my server did sent out the application bytes with

Response.BinaryWrite(response.Application.Bytes);

I don’t understand why, andorid emulator can not receive, intead it seems create its own apk file from the html content.

  • 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-16T18:07:37+00:00Added an answer on May 16, 2026 at 6:07 pm

    Finally I got my problem solved.

    Becase Firefox sends one http request base on my download link.

    But Android emulator sends two http request base on my download link

    I have to ignore the first request.

    It took me few hours to figure it out.

    Hope this information can help others

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

Sidebar

Related Questions

I'm having a go at developing my first android application and have never really
i am having problem in navigating from UIWebview to back on my application screen
I am following a tutorial to download file from server. But having some trouble.
Our application downloads data from the internet using RSS but is having connection problems
In my application, I'm trying to download a file from my website, but I'm
I have an android application that parses some HTML, downloads an image, and displays
I'm having a problem getting my android dev environment setup in Windows 7. I
We're having a problem getting Word documents to download in IE7/IE8 using window.open calls.
I having problem with file download, I am able to download file in emulator
i am having no problem at all compiling/debugging my web app, but when i

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.