---
title: "How to Android WebView Opens links in browser instead of app?"  
description: "How to Android WebView Opens links in browser instead of app?"  
author: "Elena Glibart"  
published: 2015-02-03  
updated: 2015-02-03  
canonical: https://www.mindstick.com/forum/12936/how-to-android-webview-opens-links-in-browser-instead-of-app  
category: "mobile development"  
tags: ["android", "android sdk"]  
reading_time: 1 minute  

---

# How to Android WebView Opens links in browser instead of app?

Every time I [click](https://www.mindstick.com/articles/12423/social-login-magento-2-one-click-to-register-social) on a [link](https://www.mindstick.com/articles/23633/link-builder) in the [webview](https://www.mindstick.com/articles/12868/webview-in-android), it takes me out of the webview and into a separate [browser](https://www.mindstick.com/blog/155254/which-is-the-best-internet-browser) window. **How do I get all the [links](https://www.mindstick.com/blog/415/css3-links) to open in the webview?**

## Replies

### Reply by Lillian Martin

You need to implement setWebViewClient(....) like so.

```
webView.setWebViewClient(new WebViewClient() { @Overridepublic boolean shouldOverrideUrlLoading(WebView view, String url) {        view.loadUrl(url);        return true;        }});
```


---

Original Source: https://www.mindstick.com/forum/12936/how-to-android-webview-opens-links-in-browser-instead-of-app

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
