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
I'm trying to catch blob url downloads to handle them manually since android is not supporting them and crashes the app, but I can't find a way to do it.
onShouldStartLoadWithRequest seems like is being triggered only when the react app loads, but after that no longer triggers.
The code below just prints http://10.0.2.2:9000/, but never blob
I don't know about handling blob URLs on Android, but in order to (at the very least) not crash when navigating to blob URLs, I used the following snippet in the past:
constSimplifiedExample=()=>{constwebViewRef=useRef<WebView>(null);consthandleNavigationStateChange=({ url }: WebViewNavigation)=>{if(!url)return;if(url.startsWith("blob")){webViewRef.current?.stopLoading();console.log("Prevented blob url from loading");}};return(<WebViewallowFileAccessallowFileAccessFromFileURLsallowUniversalAccessFromFileURLsonNavigationStateChange={handleNavigationStateChange}ref={webViewRef}/>);};
If it still crashes, I seem to recall that not showing a loading spinner/rendering an error screen helped.
I'm trying to catch blob url downloads to handle them manually since android is not supporting them and crashes the app, but I can't find a way to do it.
onShouldStartLoadWithRequest seems like is being triggered only when the react app loads, but after that no longer triggers.
The code below just prints http://10.0.2.2:9000/, but never blob
Environment:
The text was updated successfully, but these errors were encountered: