Inject cookie into WebView doesn't work
<p>I have some problem with the injecting of my cookie into login.php page. This is the code:</p>

<pre><code>LinearLayout lLayout = (LinearLayout)findViewById(R.id.linearlayoutIdLogin);
lLayout.setVisibility(View.GONE); //make my standard layout inivisible
LinearLayout lWeb = (LinearLayout)findViewById(R.id.webviewId); 
lWeb.setVisibility(View.VISIBLE); //make my webview visible
WebView browse = (WebView)findViewById(R.id.webViewBrowse);
</code></pre>

<p>The code above is correct. I got my WebView to load but then the page says I need to login.</p>

<p>This is the cookie injection that doesn't work for me.</p>

<pre><code>Cookie setcookie = cookie.get(1);
Cookie othercookie = cookie.get(0);
/* I assign my two cookies from a List&lt;Cookie&gt;. cookie.get() 
brings the element I need. The cookies overall contains two fields. Therefore 
the get 1 and get 0. All this works, I have tested to make a Toast to
print out the cookies */

//Here it must be anything I'm doing wrong?
CookieManager cookieManager = CookieManager.getInstance(); 
cookieManager.setAcceptCookie(true);
cookieManager.setCookie("http://www.thedomain.com", setcookie.getValue());

browse.setWebViewClient(new WebViewClient(){ });
browse.loadUrl("mypagewhenloggedin.php");
</code></pre>

<p>Any ideas? Have been stuck on this for a several hours. Thanks in advance!</p>

<p>Edited code:
Forgot to say I added this cookie too.</p>

<p><code>cookieManager.setCookie("http://www.thedomain.com", othercookie.getValue());</code></p>
