728x90
세션굽기 :D
String session = "구울세션값"
CookieSyncManager cookieSyncManager = CookieSyncManager.createInstance(mWebView.getContext());
String url = "URL경로";
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.setAcceptCookie(true);
cookieManager.removeAllCookies(null);
cookieManager.setCookie(url, session);
cookieSyncManager.sync();
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Log.e("sdk_int", Build.VERSION.SDK_INT+"");
}else{
CookieSyncManager manager = CookieSyncManager.createInstance(this);
manager.sync();
}
mWebView.setCookiesEnabled(true);
mWebView.setThirdPartyCookiesEnabled(true);
728x90
'안드로이드 > JAVA' 카테고리의 다른 글
[code] android recyclerview 깜빡임 방지 (0) | 2022.02.17 |
---|---|
[error] com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details (0) | 2022.01.19 |
[code] android Bitmap To Base64 (0) | 2022.01.13 |
[code] android recyclerview ViewTreeObserver (0) | 2022.01.07 |
[code] android delay handler postDelayed (0) | 2021.04.29 |