Rigel
Rigel

Reputation: 882

Where should I save authtoken android 2.3

Hi I am learning Android development. My query is when I get access token from AccountManager Android for "writely" google document. Where should I save the authtoken? I am developing for API 7.

Upvotes: 2

Views: 567

Answers (1)

Nikolay Elenkov
Nikolay Elenkov

Reputation: 52936

You don't really need to save it. AccountManager caches tokens automatically, so you will get the same token when you call getAuthToken(). You should be able to handle the case when the token is expired though. If you really want to save it, SharedPreferences is the natural place.

Upvotes: 2

Related Questions