본문 바로가기
Android

WebView로 cookie 데이터 저장

by 캡틴노랑이 2021. 8. 9.
반응형

WebView로 cookie 데이터 저장

    
import android.webkit.CookieManager;


CookieManager.getInstance().removeAllCookies(null);
CookieManager.getInstance().setCookie("http://192.168.18.13:808", "name" + "=" + name);
CookieManager.getInstance().setCookie("http://192.168.18.13:808", "action" + "=" + action);
CookieManager.getInstance().setAcceptThirdPartyCookies(webView, true);


webView.loadUrl("http://192.168.18.13:808/" + path );
반응형

댓글