It is necessary that when clicking on any link that does not lead to the pages of the site http://site.com , the choice of browsers to open the site is launched.
The whole application is this mobile version of the site packed in a webview, in order not to violate the integrity of all links that go not to the domain of the site need to be opened in the browser, and not in the application.
Program Code:
import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.webkit.WebView; import android.webkit.WebViewClient; public class MainActivity extends AppCompatActivity { private WebView web; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); web = (WebView) findViewById(R.id.web); web.setWebViewClient(new WebViewClient()); web.loadUrl("https://site.com"); web.getSettings().setJavaScriptEnabled(true); } @Override public void onBackPressed() { if (web.canGoBack()) { web.goBack(); } else { super.onBackPressed(); } } }