如何强制浏览器在前台下载? [英] How to to force the browser to download in foreground?

查看:392
本文介绍了如何强制浏览器在前台下载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序这是市场的分布外,用户可以通过下载的APK升级。我的应用程序时通知用户有可用的升级,如果他/她点击升级,一个视图的意图再与APK URL启动。

in my app which is distributed outside of the market, the user can upgrade by downloading an apk. My app notifies the user when an upgrade is available, and if he/she clicks 'Upgrade', a VIEW intent is then launched with the apk URL.

服务器端,APK静态交付,以MIME类型应用程序/ vnd.android.package存档

Server-side, the apk is delivered statically, with mimetype application/vnd.android.package-archive.

这一切工作正常。然而,从升级Froyo开始,浏览器会立即退出,并执行下载的背景。这对用户相当混乱。升级Froyo之前,下载在前台进行,当完成它是自然的用户在下载的项目挖掘。

All this works fine. However, starting from Froyo, the browser exits immediately and performs the download in background. That's quite confusing for the user. Before Froyo, the download was performed in the foreground, and when done it was natural for the user to tap on the downloaded item.

有没有办法让在升级Froyo在前台浏览器下载?

Is there a way to have the browser download in the foreground in Froyo?

推荐答案

其实,我找到了答案,我的问题。使用时,将APK直接的网址,但使用同一个下载按钮中介HTML页面时,下载,然后在前台执行出现问题。

I actually found the answer to my question. The problem occurs when using a direct URL to the APK, but when using a intermediary html page with a download button, the download is then performed in the foreground.

这篇关于如何强制浏览器在前台下载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆