GithubHelp home page GithubHelp logo

Comments (8)

JensUweB avatar JensUweB commented on June 16, 2024 2

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.

from cordova-plugin-inappbrowser.

klochko7 avatar klochko7 commented on June 16, 2024

I have the same issue. When I am trying to download apk file from chrome, download does not start.

from cordova-plugin-inappbrowser.

janpio avatar janpio commented on June 16, 2024

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.

from cordova-plugin-inappbrowser.

opare avatar opare commented on June 16, 2024

I have the same issue too. Any news about that? Thanks.

from cordova-plugin-inappbrowser.

Macfa avatar Macfa commented on June 16, 2024

same issue here !

from cordova-plugin-inappbrowser.

lovepanda603 avatar lovepanda603 commented on June 16, 2024

same issue , Hope to be solved

from cordova-plugin-inappbrowser.

AiNings avatar AiNings commented on June 16, 2024

IOS cannot download online files, have you solved it?

from cordova-plugin-inappbrowser.

JensUweB avatar JensUweB commented on June 16, 2024

@janpio How is it going with this? I'm currently facing the same problem. I could setup a minimal repo, if still needed.
This project is still maintained, right?

from cordova-plugin-inappbrowser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.