I'm trying to redirect my user after successful authentication (using AJAX). I've tried using window.location.href and document.location but without success. I also want to keep the cookies.
Here's my Android App code:
WebView myWebView = findViewById(R.id.mainView);
myWebView.loadUrl("http://192.168.100.5:3000/");
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
CookieManager.getInstance().setAcceptCookie(true);
myWebView.setWebViewClient(new WebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});