All Projects → lany192 → KVUtils

lany192 / KVUtils

Licence: Apache-2.0 license
基于tencent mmkv的key-value封装工具。Key-value packaging tool based on tencent mmkv

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to KVUtils

Serialize
🍒 Android 简单高性能读写本地数据, 直接存储对象/基础类型
Stars: ✭ 181 (+686.96%)
Mutual labels:  mmkv
DropBeat
A Music Player with downloading, playing, searching, exploring functions.
Stars: ✭ 13 (-43.48%)
Mutual labels:  mmkv
PlayAndroid
✌️✊👋玩安卓Mvvm组件化客户端,整合Jetpack组件DataBinding、ViewModel以及LiveData;屏幕适配✔️状态栏沉浸式✔️黑夜模式✔️,无数据、加载失败状态页;骨架屏、Koin依赖注入等
Stars: ✭ 193 (+739.13%)
Mutual labels:  mmkv

KVUtils

基于tencent mmkv的key-value封装工具 Key-Value packaging tool based on Tencent MMKV

使用MMKV代替SharedPreferences的理由:

1.更好的性能
2.MMKV体积很小
3.支持SharedPreferences旧数据迁移
4.API友好
5.支持加密解密

Import

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

dependencies {
    implementation 'com.github.lany192:KVUtils:1.0.4'
    //腾讯mmkv https://github.com/tencent/mmkv
    implementation 'com.tencent:mmkv-static:1.2.11'
}

Usage

KVUtils.get().putString("my_key", value);
KVUtils.get().putBoolean("my_key", true);
KVUtils.get().putInt("my_key", 999999);
String value = KVUtils.get().getString("my_key");
......

Thanks

MMKV https://github.com/Tencent/MMKV

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].