react-native-webview

React Native WebView App not exit on pressing back button

泄露秘密 提交于 2021-01-26 14:53:04
问题 React Native WebView App not exit on pressing back button after setting Go back functionality on back button pressed. I want go back functionality on pressing back button when webview is not on home page and when webview is on home page then exit the app. export default class WebView extends Component { constructor (props) { super(props); this.WEBVIEW_REF = React.createRef(); } componentDidMount() { BackHandler.addEventListener('hardwareBackPress', this.handleBackButton); }

onShouldStartLoadWithRequest automatically calling in iOS React Native on loading of any url in WebView, How to control it?

随声附和 提交于 2021-01-06 03:22:14
问题 I'm implementing in App WebView for my App. I've to open some info pages and I've to get some data based on the click of any particular place(which contains a different type of data) in webview. But in iOS, while loading any URL onShouldStartLoadWithRequest calling automatically which leads opening different URLs in the HTML content. But it is working as expected in Android. <WebView originWhitelist={["*"]} style={style} source={source} showsVerticalScrollIndicator=

onShouldStartLoadWithRequest automatically calling in iOS React Native on loading of any url in WebView, How to control it?

故事扮演 提交于 2021-01-06 03:19:45
问题 I'm implementing in App WebView for my App. I've to open some info pages and I've to get some data based on the click of any particular place(which contains a different type of data) in webview. But in iOS, while loading any URL onShouldStartLoadWithRequest calling automatically which leads opening different URLs in the HTML content. But it is working as expected in Android. <WebView originWhitelist={["*"]} style={style} source={source} showsVerticalScrollIndicator=

The method stopLoading of react-native-webview causes the website to freeze

本秂侑毒 提交于 2020-12-09 13:51:32
问题 I want to intercept clicks on a link in my webview in react-native and perform a custom action instead of navigating to the target of the link as described in the official guide. Here's what I do: import React from 'react'; import {View, Linking} from 'react-native'; import AsyncStorage from '@react-native-community/async-storage'; import {WebView} from 'react-native-webview'; export default class WebViewScreen extends React.Component { static navigationOptions = { title: 'Produck', };

The method stopLoading of react-native-webview causes the website to freeze

一曲冷凌霜 提交于 2020-12-09 13:42:04
问题 I want to intercept clicks on a link in my webview in react-native and perform a custom action instead of navigating to the target of the link as described in the official guide. Here's what I do: import React from 'react'; import {View, Linking} from 'react-native'; import AsyncStorage from '@react-native-community/async-storage'; import {WebView} from 'react-native-webview'; export default class WebViewScreen extends React.Component { static navigationOptions = { title: 'Produck', };

How do I open https URL from One Signal push-notification WITHIN my WebView react-native app?

北城以北 提交于 2020-05-17 07:27:04
问题 I've created a React-native app (tested in android) using WebView with the initial URL of my company's website. I want the user to be able to get redirected to a spesific website's product page (for example https://www.test.com/product/hoodie-with-zipper/) WHEN they clicked the OneSignal push notification with the intended launch URL included in the sent notification. The problem is, I want the user to open the URL with my WebView App, not the browsers. The features I've implemented and

crypto.getRandomValues() not supported

纵然是瞬间 提交于 2020-05-15 09:25:46
问题 I'm getting this error with npm react-native-webview@9.0.1 when I try to generate a QR code with react-native-qrcode-generator I'm using react-native with an expo managed workflow. And the thing is it works on iOS, and i only get the error on Android I searched for a solution myself and I tried installing react-native-get-random-values but that also didn't work. Any thoughts? 回答1: I just had the same issue on android. Works fine on iOS. I solved it with: Uninstall the existing one npm