Stay logged in on a website in an application lifecycle
<p>I was able log in through my android app to <a href="http://yearbook08.com/" rel="nofollow">http://yearbook08.com/</a> using this code:</p>

<pre><code>    String URL="http://yearbook08.com/login.php";

    HttpClient httpclient = new DefaultHttpClient();
    HttpResponse response = null;


    HttpPost httppost = new HttpPost(URL); 
    List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();
    nameValuePairs.add(new BasicNameValuePair("userId", uname));
    nameValuePairs.add(new BasicNameValuePair("password", pass));
    try {
        httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
    } catch (UnsupportedEncodingException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
    }



    try {
        response = httpclient.execute(httppost);
    } catch (ClientProtocolException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
</code></pre>

<p>Now when I move to another activity I want to retrieve <a href="http://yearbook08.com/wall.php" rel="nofollow">http://yearbook08.com/wall.php</a> but the web server does not recognize my last login and asks me to login again.</p>

<p>Is there a way that I can stay logged in after once logging in? Kindly help !</p>
