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 Intent
extras, 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 WebView
in your application, and you can use the CookieManager
to inject your cookie into the WebView
's environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With