Android phone comes with browser does not recognize APK file

Source: Internet
Author: User
Tags samsung android

Original: http://www.cnblogs.com/yaozhongxiao/archive/2013/07/17/3194765.html

In the project encountered the Android bring the browser download success, but unable to open the downloaded APK file automatic installation problem, especially the Samsung series of mobile phones generally exist this problem, Google found that there are also friends encounter similar problems: http://bbs.csdn.net/topics/390262400

Cited:

Write some Android apps put on the site for people to download, on some models, Samsung Android more than 4.0 models most common, with the Android browser to download the program, will be prompted "Unable to open the file", resulting in the download can not be installed directly.

Now it can only be solved in the following ways:
1. Use UC to download the installation, but this requires the customer to use UC to download and install our system
2. Call the user on Android on the desktop, open the folder, then the APK click to install
Issue: Some Android-brought browsers may have limitations on the download APK installation. I would like to use my own method, such as modifying the APK or some compilation parameters, can solve the compatibility of this installation problem?

Workaround: (1). On the IIS server, add one of the MIME types:

File extension:. apk
MIME type: application/vnd.android.package-archive

(2). Server deployed under Tomcat, the mini type is already configured in the Tomcat Web. xml

<mime-mapping>
<extension>apk</extension>
<mime-type>application/vnd.android.package-archive</mime-type>
</mime-mapping>

According to the above method, after the Samsung mobile phone download, the APK can not open the problem of direct installation, but also found that one of Huawei's mobile phone using the default browser is still unable to open the installation, after many tests, Found in Android Androidmanifest.xml, if the lack of targetsdkversion, Huawei Mobile phone through the default browser can not be installed after downloading, plus everything is ok (see how the different Android system is so tangled AH)

<uses-sdk  android:minsdkversion= "8"  android:targetsdkversion= "8"/>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.