I have a webview. My question is, when user clicks to a link in webview, how to continue with my app?
When user clicks to a link, this dialog box appearing:
How can I avoid this dialogbox and continue with my app?
WebView Code:
WebView webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl(url);
Edit (MYActivity İn Test project)
package com.mycompany.myapp5;
import android.app.*;
import android.os.*;
import android.webkit.*;
public class MainActivity extends Activity
{
WebView view;
String url="http://google.com";
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
view.setWebViewClient(new WebViewClient()
{
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return false;
}
});
}
}