Reactor is key value database and is a great alternative to Shared Preferences.

Overview
Reactor

License API

Reactor is a fast and secure key-value library for Android, and has an embedded database based on the JSON structure and is a great alternative to Shared Preferences.

Features + Road map
First Edition 1.x.x
  • Save and restore a variety of objects (serialization and deserialization)
  • Symmetric encryption of objects (signed by target application at runtime + Hardware_ID)
  • Very high performance‍
  • Very low library size (No need for other libraries)
  • Supported and tested in API 15 and above
  • Minimal and easy to use :)
Second Edition 2.x.x
  • Save and restore all objects at runtime in RAM
  • Add a data branch (branches can be independent of the main branch)
  • Imports data from Shared Preferences to Reactor
  • ‍‍Change the underlying AES password generation
  • Change the storage infrastructure
  • ‍‍‍Add concurrency + thread-safe functionality

Bitcoin (BTC) Donate: 1HPZyUP9EJZi2S87QrvCDrE47qRV4i5Fze

Ethereum (ETH) Donate: 0x4a4b0A26Eb31e9152653E4C08bCF10f04a0A02a9

Tron (TRX) Donate: TAewZVAD4eKjPo9uJ5TesxJUrXiBtVATsK

Getting Started :

Add to your root build.gradle :Ï

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

Add the dependency :

dependencies {
    implementation 'com.github.oky2abbas:reactor:v1.2.5'
}
Simple API (default) :

In Kotlin :

val reactor = Reactor(context)
val reactor = Reactor(context, false) // disable encryption

-----------------------------------------------------------

reactor.put("name", "abbas")
reactor.put("age", 23)
reactor.put("this", this::class.java)

-----------------------------------------------------------

val name = reactor.get("name", "")
val isDay = reactor.get("day", false)
val thisClass = reactor.get("this", this::class.java)

-----------------------------------------------------------

reactor.remove("day", false)
reactor.clearAll()

In Java :

Reactor reactor = new Reactor(getContext());
Reactor reactor = new Reactor(getContext(), false); // disable encryption

-----------------------------------------------------------

reactor.put("name", "abbas");
reactor.put("age", 23);
reactor.put("array", new int[]{0, 0, 0});

-----------------------------------------------------------

String name = reactor.get("name", "");
Integer age = reactor.get("age", 0);
int[] array = reactor.get("array", new int[]{0, 0, 0});

-----------------------------------------------------------

reactor.remove("age", 0);
reactor.clearAll();
FAQ :
Need more help?
How to store and restore the custom class ?
License
MIT License

Copyright (c) 2020  abbas naqdi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
You might also like...
General purpose utilities and hash functions for Android and Java (aka java-common)

Essentials Essentials are a collection of general-purpose classes we found useful in many occasions. Beats standard Java API performance, e.g. LongHas

Access and process various types of personal data in Android with a set of easy, uniform, and privacy-friendly APIs.
Access and process various types of personal data in Android with a set of easy, uniform, and privacy-friendly APIs.

PrivacyStreams PrivacyStreams is an Android library for easy and privacy-friendly personal data access and processing. It offers a functional programm

A library for fast and safe delivery of parameters for Activities and Fragments.

MorbidMask - 吸血面具 Read this in other languages: 中文, English, Change Log A library for fast and safe delivery of parameters for Activities and Fragment

A simple and easy to use stopwatch and timer library for android

TimeIt Now with Timer support! A simple and easy to use stopwatch and timer library for android Introduction A stopwatch can be a very important widge

Trail is a simple logging system for Java and Android. Create logs using the same API and the library will detect automatically in which platform the code is running.

Trail Trail is a simple logging system for Java and Android. Create logs using the same API and the library will detect automatically in which platfor

General purpose utilities and hash functions for Android and Java (aka java-common)

Essentials Essentials are a collection of general-purpose classes we found useful in many occasions. Beats standard Java API performance, e.g. LongHas

Matches incoming and/or outgoing text messages against set rules and sends them over to webhook.

Textmatic If you ever wanted a tool to simply push the SMS (or text messages) from your phone to somewhere remote, this is it. This app matches all in

Command framework built around Kord, built to be robust and scalable, following Kord's convention and design patterns.

Command framework built around Kord, built to be robust and scalable, following Kord's convention and design patterns.

DiskCache - Simple and readable disk cache for kotlin and android applications

DiskCache Simple and readable disk cache for kotlin and android applications (with journaled lru strategy) This is a simple lru disk cache, based on t

Comments
  • Flawed Encryption/Security

    Flawed Encryption/Security

    Currently library is using following method to get password for decryption, which is always constant.

    private fun getPassword(): String { val uuid = (getSign() + getUUID()) return getSHA256(uuid) ?: uuid }

    Passwords should be generated randomly for each sesssion and stored securely, like Android Keystore system: https://developer.android.com/training/articles/keystore

    pending 
    opened by sreejithbnaick 1
  • return null for class

    return null for class

    reactor return null object when i use this code:

    public UserModel getUserModel() {
    	return reactor.get("UserModel", new UserModel());
    }
    
    public void updateUserModel(UserModel value) {
    	reactor.put("UserModel", value);
    }
    
    good first issue invalid question 
    opened by sajjadintel 1
Releases(1.5.6)
Owner
mr amir abbas
mr amir abbas
Android library to easily serialize and cache your objects to disk using key/value pairs.

Deprecated This project is no longer maintained. No new issues or pull requests will be accepted. You can still use the source or fork the project to

Anup Cowkur 667 Dec 22, 2022
✔️ Secure, simple key-value storage for Android

Hawk 2.0 Secure, simple key-value storage for android Important Note This version has no backward compatibility with Hawk 1+ versions. If you still wa

Orhan Obut 3.9k Dec 20, 2022
Expirable Disk Lru Cache is a secure(with encryption) wrapper for [DiskLruCache](https://github.com/JakeWharton/DiskLruCache) that allows expiring of key/value pairs by specifying evictionTimeSpan. It has very simple API.

ExpirableDiskLruCache ExpirableDiskLruCache is a wrapper for DiskLruCache that allows expiring of key/value pairs by specifying evictionTimeSpan. It h

Vijay Rawat 24 Oct 3, 2022
Secure Preference Manager for android. It uses various Encryption to protect your application's Shared Preferences.

Secure-Pref-Manager ##Secure Preference Manager is a simple Library to help you protect your Shared Preferences. Secure Preference Manager for android

Prashant Solanki 72 Nov 25, 2022
Aplicación Android para comprender como funciona el listado y las shared preferences

READ.ME Este proyecto tiene como finalidad explicar como se debe utilizar un RecyclerView con una vista bindeada a este. En el proyecto se puede ver c

Carlos Muñoz Bustamante 4 Apr 12, 2022
An easy-to-use, cross-platform measurement tool that pulls data out of CD pipelines and analysis the four key metrics for you.

Maintained by SEA team, ThoughtWorks Inc. Read this in other languages: English, 简体中文 Table of Contents About the Project Usage How to Compute Contrib

Thoughtworks 277 Jan 7, 2023
⚙ A beautiful and extensible API for bulding preferences screen

Material Preferences ?? Installation Add this in app's build.gradle file: implementation 'com.imangazaliev.material-prefs:core:<version>' implementati

Mahach Imangazaliev 59 Jul 26, 2022
Preferences data store example

DataStore Example this example shows how you can use data store to store data in key value pairs and get rid of shared preferences Medium Article: htt

Kashif Mehmood 24 Dec 15, 2022
Keep data as a linked list on disk. A alternative way to reduce redundant operation for DiskLruCache

DiskLinkedList Keep data as a linked list on disk. An alternative way to reduce redundant operation for DiskLruCache Use-case Android have build-in Di

Cuong V. Nguyen 6 Oct 29, 2021
gRPC and protocol buffers for Android, Kotlin, and Java.

Wire “A man got to have a code!” - Omar Little See the project website for documentation and APIs. As our teams and programs grow, the variety and vol

Square 3.9k Dec 31, 2022