[android-developers] Re: Cookies reseted

2011-01-21 Thread lou
Yes, sorry. I did it in my code, but not when I wrote it here! On Jan 14, 7:05 pm, Mohammed Le Doze mohammed.led...@googlemail.com wrote: You are welcome. It sure will be useful for somebody. Just a quick note about your getCookie method: make sure to store the size of the 'cookies' list

Re: [android-developers] Re: Cookies reseted

2011-01-18 Thread Mohammed Le Doze
You are welcome. It sure will be useful for somebody. Just a quick note about your getCookie method: make sure to store the size of the 'cookies' list before the for loop. Not doing so forces the JVM to calculate the size of the list on each iteration. More info here:

[android-developers] Re: Cookies reseted

2011-01-14 Thread lou
Thank you Mohammed, but I've already seen these questions ! I win ! I don't use onSaveInstanceState/onRestoreInstanceState because I save the cookie in SharedPreferences when I receipt it , and restore it if I have to create a new HttpClient. So my code : private static final String COOKIE_NAME =

[android-developers] Re: Cookies reseted

2011-01-13 Thread Federico Paolinelli
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

[android-developers] Re: Cookies reseted

2011-01-13 Thread lou
First of all, thanks a lot for your answer Federico! My server seems to always accept the same cookie, I'm not sure, but for now, we can guess it ! So I think I'll try to serialize store the cookie before the activity is killed, and restore it when restart. I'll send a message after this work is