On Tue, Oct 11, 2011 at 10:46 AM, Shruthi Varma <shruthi.tlis...@gmail.com> wrote: > I don't know how to save the cookies in an application. > > Because in the shared preferences, only primitive types (strings, > integers, boolean values) can be stored.
Use an XML file. Or a JSON file. Or a file with one cookie per line. Or some other flat-file format. Or a database. > If I store the cookie value in the form of a string. I don't know how > to set it to HttClient.setCookieStore(CookieStore); when the > aplication starts again I imagine that you create an instance of a Cookie (e.g., BasicClientCookie), then call addCookie() on the CookieStore, though I have not tried this. Since HttpClient is widely used outside of Android, though, I would imagine you can find some posts or something that describe how to do this. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0 Available! -- 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