Android - Save data from WebView -


currently using webview in application load webpage. have loaded following webpage url in webview:

http://domain_name/app/ 

if user not logged in url redirected url login url. here login url:

http://domain_name/app/index.php?r=site/login 

after user enter username , password redirected following url:

http://domain_name/app/index.php?r=site/homepage 

when user logged in homepage shown user.

my problem when application removed recent list login data lost , application redirected login screen.

i have 1 way solve issue. first give login page url after successful user login change url homepage url instead of login page url.

is there other way solve issue or way save login data application storage?

before load page use:

cookiemanager.getinstance().setacceptcookie(true); 

if won't work read cookiesyncmanager synchronize browser cookie store in ram , permanent storage.

for lollipop , above should enough:

cookiemanager.getinstance().setacceptthirdpartycookies(true); 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -