Okhttp3를 사용중이고 웹뷰에서 로그인 세션을 유지하기 위해 아래 코드를 사용했는데
첫줄이 자꾸 에러가 나네요.
CookieManager는 추상적이어서 인스턴스화 할 수 없다는것 같은데
코드를 어떻게 바꿔야 할 지 모르겠네요.
http://stackoverflow.com/questions/34881775/automatic-cookie-handling-with-okhttp-3
위 링크를 참조했습니다.
// init cookie manager
CookieHandler cookieHandler = new CookieManager(new PersistentCookieStore(ctx), CookiePolicy.ACCEPT_ALL);
// init okhttp 3 logger
HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
logging.setLevel(HttpLoggingInterceptor.Level.BODY);
// init OkHttpClient
OkHttpClient httpClient = new OkHttpClient.Builder()
.cookieJar(new JavaNetCookieJar(cookieHandler))
.addInterceptor(logging)
.build();