I must develop an Android Application that open certain urls in a Webview , but i have some problem :
When i try to open mobile site (
m.site.something.it
) an intent start , wondering which browser i want use to open the web site.I want force the opening of each site in a webview ( NO broweser ) .
I need to intercept all
HttpRequest
andHttpResponse
all , how i can do this ?
I'm developing for Android 6.0 , to post olds using deprecated method .
EDIT
Intent intent = getIntent();
String urlToLoad = intent.getStringExtra("url");
// webView.getSettings().setAppCacheEnabled(false);
WebView webview = (WebView) findViewById(R.id.wv);
webview.getSettings().setLoadWithOverviewMode(true);
webview.getSettings().setUseWideViewPort(true);
//THIS SHOULD FORCE OPEN SITE IN WV, BUT NOT WORK
webview.getSettings().setUserAgentString("Android");
webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
webview.loadUrl(urlToLoad);
***** EDIT 2 *****
Another problem is :
2. I need to intercept all HttpRequest
and HttpResponse
all , how i can
do this ?