bboks.net™

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

Mobile Programming/Android

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

bboks.net 2014. 8. 12. 17:03
@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