0
私は自分のサイトのwebviewアプリを持っています。 webView ...のみいくつかのすべて!私のアプリには私のサイトのリンクはありません!ブラウザ内のwebView内のいくつかのリンクを開きます(一部ではありません)
たとえば! URLでこのタラでのSMSトーストのURLが含まれています。
setContentView(R.layout.activity_main);
web = (WebView) findViewById(R.id.web);
web.getSettings().setSupportZoom(true);
web.getSettings().setJavaScriptEnabled(true);
web.getSettings().setSupportZoom(true);
web.getSettings().setLoadWithOverviewMode(true);
CookieManager.getInstance().setAcceptCookie(true);
web.loadUrl(url);
String weburl = web.getUrl();
if(weburl.contains("sms")){
Context context = getApplicationContext();
CharSequence text =weburl;
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(context, text, duration);
toast.show();
}
タンクあなた