Curently in my Android app, I am using CookieManager and CookieSyncManager.
What I notice is that, the cookie is not updated properly.
For example:
Android ----> Server: No cookie
Server ----> Android: Cookie C1
Android ----> Server: Cookie C1 (Correct)
Server ----> Android: Cookie C2
Android ----> Server: Cookie C1 C2 (Incorrect)
Because of the 2 cookies returned, server side rejected the transaction.
I have tried to force sync, but the issue still persists. I even tried to
add some sleep, but it did not help either.
Any suggestion on what else I can try?
Thank a lot.
Regards
Kevin
=================
cookieManager = CookieManager.getInstance();
cookieInput = cookieManager.getCookie(OCBCConstants.HOST_URL);
write("Cookie from CookieManager 4:" + cookieInput);
cookieManager.removeAllCookie();
//SystemClock.sleep(2000);
cookieManager = CookieManager.getInstance();
cookieInput = cookieManager.getCookie(OCBCConstants.HOST_URL);
write("Cookie from CookieManager 5:" + cookieInput);
cookieManager.removeSessionCookie();
cookieManager.removeAllCookie();
//SystemClock.sleep(2000);
//CookieSyncManager.getInstance().sync();
cookieManager.setCookie(OCBCConstants.HOST_URL, cookieString);
cookieManager.setCookie(OCBCConstants.HOST_URL, cookieString1);
cookieManager.setCookie(OCBCConstants.HOST_URL, cookieString2);
//SystemClock.sleep(5000);
cookieManager = CookieManager.getInstance();
cookieInput = cookieManager.getCookie(OCBCConstants.HOST_URL);
write("Cookie from CookieManager 6:" + cookieInput);
CookieSyncManager.getInstance().sync();
//SystemClock.sleep(30000);
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en