Android – extracting cookies after login in webview

You can extract all cookies current url by this way from webview as string:

@Override
public void onPageFinished(WebView view, String url){
    String cookies = CookieManager.getInstance().getCookie(url);
    Log.d(TAG, "All the cookies in a string:" + cookies);
}

Leave a Comment