0

I have a question about the android WebViewClient, is it possible to make for instance a page where users can login and then save the credentials into a cookie like we could do on regular website that is not running inside an Android App?

If we can't do this, what can we use to achieve this, it should be a really basic easy thing to create we don't need tight security or anything. We basically only want to use an email address to let the user login to the application and let them stayed logged in.

Any suggestion or help would be greatly appreciated, sins Android Studio is completely new to me.

Thanks in advance.

dda
  • 6,030
  • 2
  • 25
  • 34
Iason
  • 372
  • 1
  • 5
  • 20
  • what about sending params in url? – Iqbal Rizky Feb 01 '17 at 10:34
  • What do you mean? I don't understand how the user then can be kept logged in by using params in the URL. I guess you would first need to verify the user is logged in by sending something? – Iason Feb 01 '17 at 10:37
  • `www.example.com/user/is/login/with_accesstoken=123456789` token generate from server to identified that is comming from your apps – Iqbal Rizky Feb 01 '17 at 10:39
  • So for example, user opens first time app fills in his mailaddress submits it. Server returns token then I store it on mobile device with CookieManager. Next time user opens the app, it check with CookieManager if token is stored and by passes the login screen. Is this what you are suggesting ? – Iason Feb 01 '17 at 11:09

1 Answers1

0

so basically, WebView is just used to display, and doesn't actually have the ability to save data. However, you can use CookieManager & CookieSyncManager to store the data you need

AndriaW
  • 1
  • 1