Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot download & install app APK from own webpage

I'm trying to have my apps available for download on a website, however, when I upload the APK file, it cannot be found by the browser.

When zipping the APK, it is detected. However, not all phones can install from a ZIP - I have had mixed results.

Why can't I simply upload an APK and have a URL point to it for a download? Why am I getting a 404 and what can I do to avoid it?

like image 704
Cody Avatar asked May 03 '12 22:05

Cody


People also ask

Why are my downloads not downloading?

Fix 1: Check If Many Files Are Being Downloaded. Fix 2: Change Internet Option Settings. Fix 3: Clear Your Browser's Cache. Fix 4: Scan Your Computer for Virus.

Why is my download not working?

Browser. Test your downloads in an alternative browser or email client if you have one. If the alternative program works, your issues are probably being caused by a fault with the original browser software rather than the network connection. Delete cookies and temporary Internet files, and clear the browser's cache.

Why can't I download a file from the Internet?

This error means that your computer's security settings blocked the file. Learn more about blocked downloads. On Windows: Windows Attachment Manager could have removed the file that you tried to download. To see what files you can download, or why your file was blocked, check your Windows Internet security settings.


2 Answers

Why can't I simply upload an APK and have a URL point to it for a download?

You can. Plenty of people do it. There are entire Web sites dedicated to doing it, albeit usually with pirated content.

Why am I getting a 404

Because the URL you are entering into the browser is not the URL where the file is at on the server. This is the cause of approximately 100% of 404 errors, across the Internet, regardless of circumstance.

what can I do to avoid it?

Use the proper URL. Also, be sure to set the server's MIME type configuration map to serve up your file as application/vnd.android.package-archive.

like image 125
CommonsWare Avatar answered Oct 22 '22 20:10

CommonsWare


This is what i did in my asp.net application

My Application hosted under Window server 2008r2 having IIS 7

Step 1: In .aspx page add hyperlink set navigateurl as file path

 <asp:HyperLink ID="lnkdwnload" runat="server" NavigateUrl="~/Application_Android/MyAndroidAppAame.apk">Download MyApp</asp:HyperLink>

Step 2: Web.config add mimeMap element under staticContent

<system.webServer>
    <staticContent>
      <mimeMap fileExtension=".apk" mimeType="application/vnd.android.package-archive"/>
    </staticContent>

</system.webServer>

like image 36
Satinder singh Avatar answered Oct 22 '22 21:10

Satinder singh