CookieManager is a public class in the Android API that manages the cookies used by an application's WebView instances. Cookies are manipulated according to RFC2109.
Questions tagged [android-cookiemanager]
54 questions
0
votes
1 answer
Android webview cookies are cleared/garbage collected after some time - Can I set a cookie custom storage path?
I am trying to make my webview remember its cookies. My problem is that, they are removed after some time.
After doing some research, I found out that java's internal HttpClient uses CookieManager and CookieStore will get garbage collected.…

Langkiller
- 3,377
- 13
- 43
- 72
0
votes
2 answers
Supporting cookies in Google Exoplayer
I am setting a HttpCookie in my android application associated with a domain within the cookieManager. Then, when I stream HLS videos using exo player, I want this cookie to used for each of the .ts chunk requests.
This is the code, I use to store…

user2284140
- 197
- 1
- 4
- 18
0
votes
1 answer
Can someone explain how to use CookieManager in my app?
I am trying to get User data from a database, and display it on an account page in my app. In my php, I am storing the logged in user in a session. I found out that to access the user session I have to add the sessionId to my string request like:
…

cdub
- 25
- 1
- 11
0
votes
1 answer
Only first cookie gets on server, several others cookies don't
I want to pass apiuid and apitoken by cookie. But I'm getting only the first one on server.
This is my code to initialize cookies:
public static void initCookie(String uid,String token,String domain,Context context){
try{
…

tiny sunlight
- 6,231
- 3
- 21
- 42
0
votes
1 answer
Adding Cookie to Cookie Manager in android app from SharedPreference
I am having an issue with adding cookie on the cookie manager during startup.
Problem I am trying to solve is - to add the cookie in Sharedprefrence during login response and when application is killed or exited, retrieve that cookie and add to my…

Sumit Mittal
- 59
- 5
0
votes
2 answers
Trying to load cookies with url in android webview
I am trying to load cookie in android web view. following is my java code.
final String link = "http://www.iitjeeacademy.com/mobile/question/CHE/AAH";
final String domain = "iitjeeacademy.com";
String authToken = LoginService.getCookie();
String…

Omkar
- 1,493
- 3
- 17
- 36
0
votes
1 answer
Why I get the getRequestProperty("Cookie") as a null value
Why I get the getRequestProperty("Cookie") as a null value? If it is possible help me. I want get the session id from php file and I think I should use the getRequestProperty("Cookie") method to do this. In the following code I can get the hello…

and
- 341
- 1
- 3
- 11
0
votes
1 answer
Set cookie in webview
I have to set a cookie in a WebView in order to authenticate my user.
I've found a lot a code talking about that, but CookieSyncManager is deprecated.
And this code seems to not work :
CookieManager cookieManager =…

Florian Mac Langlade
- 1,863
- 7
- 28
- 57
0
votes
2 answers
NullPointerException in CookieSyncManager.createInstance in AsyncTask
I have a class that extends from AysncTask. Inside the doInBackground method I want to update the cookies, so I have:
CookieSyncManager.createInstance(context); // <<<<<<<<<<<<<<<<<<
CookieManager cookieManager =…

Francisco Corrales Morales
- 3,676
- 1
- 37
- 64