I have saved a cookie in android. Now I want to pass it into my browser intent. Look at my current code:
Intent browser = new Intent("android.intent.action.VIEW",
Uri.parse("http://mypage.php/memberpagethatrequireacookie.php"));
//putExtra cannot take these arguments -> browser.putExtra("org.apache.http.cookie.Cookie", cookie);
startActivity(browser);
I want it to store temporarily in my browser so my member page loads successfully.
My cookie are successfully created from the HTTP request and I assign it to a List<Cookie> cookie;
Tell me if I should provide some more code.
Any ideas? Thanks in advance!
The Browser has no documented
Intentextras, let alone one that would allow you to inject a cookie. And, of course, the user might be using a different browser.You are welcome to use
WebViewin your application, and you can use theCookieManagerto inject your cookie into theWebView‘s environment.