I have a web application with login credentials. I am loading this web application in Android WebView
. It is working fine. The problem is, after application close and click on my application launcher icon in my tab it always showing login page. But I dont want login page, once I logged in and close my apllication and click launcher icon, I want to open directly after logged in page.
Here is my code:
public class MyActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
try {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
WebView webview = (WebView)findViewById(R.id.webview);
WebSettings settings = webview.getSettings();
settings.setSupportMultipleWindows(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
webview.getSettings().setJavaScriptEnabled(true);
webview.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});
webview.loadUrl("http://192.1xx.x.xxx:8280/login.jsp");
} catch(Exception e) {
}
}