You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integrating webview in my RN app. I use Publitas API as url resource and need to handle onFileDownload event on android. This is minimal code snippet for repro.
"react-native-webview": "^13.8.4",
import{Alert}from'react-native'importWebViewfrom'react-native-webview'exportconstApp=()=>{return(<WebViewsource={{uri: 'https://view.publitas.com/delhaize-belgium/2023-w42-fr'}}// just example of urlonFileDownload={(url)=>{/* downloading */}}/>)}
So according to official documentation, onFileDownload works of course only on ios, so I can easily handle it on JS side.
On android by default clicking on "download" from on web view always handled by default Download Manager, so user ALWAYS redirected to external browser, but user needs to stay inside app instead.
I've tried to watch through web view native code, but need some advice how to override that behaviour even on native side, default methods like
publicvoiddownloadFile(StringdownloadingMessage)
related to download logic even not being called
Question: Any clues how to stop default android behaviour with Download Manager and handle url manually?
The text was updated successfully, but these errors were encountered:
Integrating webview in my RN app. I use Publitas API as url resource and need to handle onFileDownload event on android. This is minimal code snippet for repro.
So according to official documentation, onFileDownload works of course only on ios, so I can easily handle it on JS side.
On android by default clicking on "download" from on web view always handled by default Download Manager, so user ALWAYS redirected to external browser, but user needs to stay inside app instead.
I've tried to watch through web view native code, but need some advice how to override that behaviour even on native side, default methods like
related to download logic even not being called
Question: Any clues how to stop default android behaviour with Download Manager and handle url manually?
The text was updated successfully, but these errors were encountered: