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)