Iframe in webview

i have a problem in my code , i want when I press in a link in iframe inside a webview the link open it in a browser so i use the function onNavigationStateChange if the url origin different to the new one I open link in browser ( Linking.openURL(event.url) )

now in snack works fin , but in the real device android all the iframe (like youtube ) open in browser il the first loading