----- Original Message -----
From: Streets Of Boston
To: [email protected]
Cc: Knutsford Software
Sent: Tuesday, June 07, 2011 3:23 PM
Subject: Re: preserve session
Yes, you can use DefaultHttpClient.
However, you should attach a org.apache.http.client.CookieStore to the
client:
Create a class that implements CookieStore.
The implementation is straight-forward. Just maintain a list of cookies in
memory if you only need session type cookies.
When setCookie(Cookie) is called, just add cookie to that list.
When getCookies() is called, just return all cookies in your list.
When clear() is called, clear you cookies-list.
You could ignore clearExpired(Date), since you're dealing with session
cookies only.
The matching of Cookies' domains, paths, secure-settings, etc. is done by
the DefaultHttpClient. You don't have to worry about it:
DefaultHttpClient client = new DefaultHttpClient();
...
client.setCookieStore(new MyCookieStore());
Ok I add that one line but how do I display the index.php page?
Would
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
then work?
Thanks
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en