webview
React Native webview get url
Here is a Webview I used for my previous project. <WebView ref=”webview” source={{uri:this.state.url}} onNavigationStateChange={this._onNavigationStateChange.bind(this)} javaScriptEnabled = {true} domStorageEnabled = {true} injectedJavaScript = {this.state.cookie} startInLoadingState={false} /> for you essential is this line: onNavigationStateChange={this._onNavigationStateChange.bind(this)} and you can read the URL like this: _onNavigationStateChange(webViewState){ console.log(webViewState.url) } If I remember correctly this fires 3 times when loading a url. … Read more
Android Development: Using Image From Assets In A WebView’s HTML
Put your Logo into the assets directory eg: assets/logo.png Then load your html with: webView.loadDataWithBaseURL(“file:///android_asset/”, htmlData, “text/html”, “utf-8″, null); Reference your img like: <img src=”https://stackoverflow.com/questions/3779789/logo.png”>