-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download file not working #311
Comments
I have the same issue. When I am trying to download apk file from chrome, download does not start. |
Please create a new Cordova project with a minimal setup to replicate the issue. Then put it on Github and post the link to it here. Thanks. |
I have the same issue too. Any news about that? Thanks. |
same issue here ! |
same issue , Hope to be solved |
IOS cannot download online files, have you solved it? |
@janpio How is it going with this? I'm currently facing the same problem. I could setup a minimal repo, if still needed. |
I found out whats going on here. InAppBrowser uses the android web view by default. Android Web View does not handle downloads by default, because it cannot render or download files (except html, css & js of course), so you have to register a download listener and handle it yourself. If you don't handle it yourself and just register the listener, the web view will crash (and so will your app), if the user klicks a download link. As workaround, you can try to modify the java code of the InAppBrowser yourself as described here. Edit: Found another possible workaround, without messing around with native java code. Link to Stackoverflow. You can inject javascript into the browser, register with the injected script a custom click listener onto your anchor links and send the download url with over the message api back to your cordova context to download the file yourself. I'm working on that right now. |
I am using the inappbrowser to download an .apk file, but the download does not start.
I've tested the HTML page by using several mobile browser and everything works.
Any feedbacks?
The text was updated successfully, but these errors were encountered: