How to open external link outside the app?

Asked

Viewed 31 times

1

My project simply opens the page of my blog, and there are several links from other sites with domain other than mine. I want that whenever the user clicks on one of these links, the same opens in the user’s browser without opening in the app. App based on WebView

Here is my Java code

public class MainActivity extends AppCompatActivity {

    private WebView navegador;

    @Override

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        navegador = (WebView)findViewById(R.id.SAIT);
        navegador.setWebViewClient(new WebViewClient());
        navegador.getSettings().setJavaScriptEnabled(true);


        navegador.loadUrl("https://www.exemplo.com");
    }

}
  • please help me

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.