<script>
function webview_redirect(uri) {
if(navigator.userAgent.match(/Android/i)){
document.location=uri;
}else if(navigator.userAgent.match(/iPhone|iPod/i)){
window.location.replace(uri);
}else if(navigator.userAgent.match(/iPad/i)){
window.location.replace(uri);
}else{
window.location.href=uri;
}
}
</script>
이렇게 document.location 해도 통하지 않네요.
다른 이유 때문인지...
막막하고 답답하네요.
alert도 안먹길래
@Override
public boolean onJsAlert(WebView view, String url, String message, final android.webkit.JsResult result){
new AlertDialog.Builder(myApp).setTitle("").setMessage(message).setPositiveButton(android.R.string.ok,
new AlertDialog.OnClickListener(){
public void onClick(DialogInterface dialog, int which){
result.confirm();
}
}).setCancelable(false).create().show();
return true;
};
이렇게 해결했는데 location.href는 안되네요 ㅠ