'세션'에 해당되는 글 1건

  1. 2014.08.12 Android WebView에 세션(쿠키) 공유하기
2014.08.12 17:03

Android WebView에 세션(쿠키) 공유하기

@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_user_report);

	WebViwe webView = (WebView) findViewById(R.id.webview);

	CookieSyncManager.createInstance(this);
	cookieManager = CookieManager.getInstance();
	CookieSyncManager.getInstance().startSync();

	//도메인 url, 쿠키
	cookieManager.setCookie("user domain url", "cookie value");
}


[참조] Syncing cookies between an HttpClient and a WebView

Trackback 0 Comment 0