In Android, is there a way we can check if a cookie used by webkit has expired? CookieManager.getCookie(url)
doesn't have the expiry dates.
Asked
Active
Viewed 3,014 times
1
1 Answers
-1
Well you have to retrieve the cookie first to a Cookie ( org.apache.http.cookie.Cookie) object and then use the "
isExpired(Date date)
" that returns true if this cookie has expired.
you can also test the date by using
getExpiryDate()
.

lastjeef
- 166
- 2
- 11
-
Sorry, I'm talking about android.webkit.CookieManager. – Green Ho Feb 19 '13 at 00:14
-
How to initialize object for org.apache.http.cookie.Cookie and where to pass the cookie name? – Chintan Apr 15 '14 at 13:10
-
@GreenHo is right, there is no info in the cookies retrieved with CookieManager.getCookie other than key and value – Radu Simionescu Oct 28 '14 at 12:07