0

So I learned the basics of android but I never understood this part. I know when using websites, authentications are made along side sessions and cookies. But what about android?

When an authentication is made, a token is generated, right? where does this token belongs in android application world? is it stored in AccountManager ? should it be stored on SharedPreferences ? I also saw something called OAuth2 but didn't get what that is.

I'm sorry if my question is stupid but it is driving me nuts in a long time.

if you have a good tutorial for these kinds of web services, where they teach real world coding examples, please let me know.

Paya Kamyar
  • 105
  • 7

1 Answers1

0

Most modern Android apps use HTTP client to do backend calls, for instance Retrofit. I would suggest reading a bit about Retrofit and about how you can use this token More about authentication token and Retrofit, here

As to where to save the token, in my current project I save the token in something similar to a static field. more info here

john-salib
  • 724
  • 1
  • 12
  • 27