Skip to content

Instantly share code, notes, and snippets.

View Zeyad-37's full-sized avatar

Zeyad Zeyad-37

View GitHub Profile
@Zeyad-37
Zeyad-37 / RealmManager.java
Last active August 29, 2020 18:21
A generic wrapper class around realm to perform all CRUD operations, while handling its realm instances and supplying live objects
public class RealmManager {
private static final String REALM_OBJECT_INVALID = "RealmObject is invalid",
JSON_INVALID = "JSONObject is invalid", NO_ID = "Could not find id!";
private static DataBaseManager sInstance;
private static Handler backgroundHandler;
private static HandlerThread handlerThread;
private RealmManager() {
}