use of com.fanap.podchat.persistance.module.AppModule in project pod-chat-android-sdk by FanapSoft.
the class ChatCore method runDatabase.
private static void runDatabase(Context context) {
if (Util.isNullOrEmpty(instance.getKey())) {
String key = generateUniqueId();
instance.setKey(key);
}
try {
DaggerMessageComponent.builder().appDatabaseModule(new AppDatabaseModule(context, instance.getKey())).appModule(new AppModule(context)).build().inject(instance);
permit = true;
} catch (Exception e) {
instance.showErrorLog("Exception init database");
permit = false;
cache = false;
}
}
Aggregations