WebViewでJavaScriptのダイアログを表示させたい

投稿者: Anonymous package com.example.makki.webviewex; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.Toast; public class WebViewEx extends ActionBarActivity { //メニューアイテムID private static final int MENU_ITEM0 = 0; private static final int MENU_ITEM1 = 1; private static final int MENU_ITEM2 = 2; private static final int MENU_ITEM3 = 3;…(Continue Reading)

WebViewでリクエストをフックして強制的に任意のURLに遷移させたい

投稿者: Anonymous package com.example.makki.webviewhooktest; import android.app.Activity; import android.graphics.Bitmap; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.webkit.WebView; import android.webkit.WebViewClient; import android.content.Intent; public class MainActivity extends Activity { public void onCreate(Bundle savedInstanceState) { WebView webview = new WebView(this); webview.setWebViewClient(new WebViewClient() { @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); }…(Continue Reading)