I would like to know the lifetime of the cookies I set in CookieManager.

Asked 2 years ago, Updated 2 years ago, 114 views

When I started the Android app, if there are any cookies left, I would directly display WebView and
If there is no left, I am trying to display the login screen.

Is the duration of the cookie set in CookieManager the same as when I saved the same cookie in my browser?
Also, in this case, would it be more effective to save it in Shared Preferences or something?

android cookie

2022-09-30 16:31

1 Answers

If you want to restart as soon as you log in,
CookieManager found that the cookie was not saved properly (with null returned).
So you might want to save it to SharedPreferences or something.


2022-09-30 16:31

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.