How to save a cookie in an Android webview forever?

You have to tell the CookieSyncManager to sync after it has loaded the page in question. In your sample code, the onCreate method executes completely before the WebView tries to load the page, so the sync process (which happens asynchronously) will probably complete before the page is loaded. Instead, tell the CookieSyncManager to sync onPageFinished … Read more