I am afraid you have to implement a recovery mechanism in any case, because of cookies expiration. If the server gives you an authentication error you should restart the authentication process before performing any other action.
In any case you can serialize and store the cookie in the shared preferences storage or in a file or wherever you want, and build a new cookie out of the saved data when your applicatoin is restarted. It should work _unless_ the cookie is expired. Hope this helps, Federico On 13 Gen, 11:48, lou <louis.coq...@wopata.com> wrote: > Hi ! > I have an application using HttpClient, who saves automatically the > cookies received from the login request. > The matter : when an activity is killed, my httpClient is reseted, > consequently all next request are refused by the server cause the > cookies aren't sent. > What can I do ? > > My suggestion : save the HttpClient in onSaveInstanceState(Bundle > outState), but I think it isn't possible > My other suggestion : get cookies ( I don't know how ! ) and save it > in onSaveInstancestate(...), and restore it in onRestoreInstanceState > > Maybe these suggestions aren't the good solution. In all case, I need > a little bit of your help ! > Thanks in advance. > Louis C. -- 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