So if a logout button is clicked on the webview (which is a spring app), the page should get back to the android login page. is this possible? the code is on a .js file. i want it like
if(btnlogout.clicked) then
go to Intent intent = new Intent(menuScreenActivity.this,
LoginActivity.class);
Hmmm maybe yo need to integrate your webview and your java code as you can see here:
http://developer.android.com/guide/webapps/webview.html
Binding JavaScript code to Android code
So, you are Telling here that your webview can use run javascript and will be able to access to your java code available at JavaScriptInterface class and its public methods on using js like this way:
The line on javascript is Android.showToast(toast); and Android is the name you choosed here webView.addJavascriptInterface(new JavaScriptInterface(this), “Android”);
showToast is a public method on JavaScriptInterface CLASS containing what ever you need, in this case:
just copied all this from that link… i think this answer your question, you can create your method called Logout that do the necesary stuff like: