If anybody is interested, looks like the solution is to use
BasicClientCookie to create cookies from strings.


On Jun 1, 6:07 pm, Randall <callmenanner...@gmail.com> wrote:
> Thanks for the reply jcpalmer.
>
> My knowledge of an android app lifecycle is not great.  Will using
> onSaveInstanceState() preserve the cookie between different uses of
> the app?  That is, if the app receives a cookie then the app exits
> later, will onSaveInstanceState() be able to retrieve this cookie when
> the app is next launched?
>
> Secondly, I'm using the org.apache classes to receive/send cookies and
> did not see straightforward way to obtain a string representation
> which could be used to instantiate a Cookie.  I really have no idea
> how to save and restore a cookie.  Any guidance would be greatly
> appreciated.
>
> Thanks
>
> On Jun 1, 4:11 pm, jcpalmer <jcpal...@rochester.rr.com> wrote:
>
>
>
> > A cookie can be represented as a String.  Wouldn't be easier to store
> > this String as a member of your Activity, and stored
> > onSaveInstanceState() ?  Then get it back onCreate().
>
> > Simple is a relative term.  Yes, it can absolutely be done with a
> > database, but not easier than above.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to