ANDROID 学习笔记(二) 用户登陆问题 TOKEN SESSION 缓存
為什么80%的碼農都做不了架構師?>>> ??
首先介紹TOKEN 緩存問題
寫個工具類 里面放入
ANDROID API 說明:
Interface for accessing and modifying preference data returned by?getSharedPreferences(String, int). For any particular set of preferences, there is a single instance of this class that all clients share. Modifications to the preferences must go through an?SharedPreferences.Editor?object to ensure the preference values remain in a consistent state and control when they are committed to storage. Objects that are returned from the various?get?methods must be treated as immutable by the application.
簡要說明: 修改完數據,一定要提交,數據的有多重保存方式
MODE_PRIVATE
MODE_WORLD_READABLE
MODE_WORLD_WRITEABLE
MODE_MULTI_PROCESS
詳細解釋見API
轉載于:https://my.oschina.net/tacg/blog/346807
總結
以上是生活随笔為你收集整理的ANDROID 学习笔记(二) 用户登陆问题 TOKEN SESSION 缓存的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: X Shell 4配色方案[Solari
- 下一篇: 日历,日期类(copy)