I am trying to get this WebView for Android code to store session cookies so that when you close the application and restart the users, they can remain in the system. I am very new to this and I get upset trying to figure it out. What do I need to change? Please be kind as an idiot and please describe, even if you need to edit it for me, if you find it easier.
I have imported both CookieManager and CookieSyncManager, but I have no IDEA what to do next. I read all the documentation and spent hours trying to figure out how to do this, save cookies so that users cannot log in again, and I just can't figure it out ...
package com.template.WebViewTemplate; import android.app.Activity; import android.os.Bundle; import android.view.KeyEvent; import android.webkit.WebView; import android.webkit.WebViewClient; import android.webkit.CookieManager; import android.webkit.CookieSyncManager; public class WebViewTemplate extends Activity { private WebView myWebView; @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK) && myWebView.canGoBack()) {
}}
source share