Search in sources :

Example 1 with AppModule

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;
    }
}
Also used : AppModule(com.fanap.podchat.persistance.module.AppModule) AppDatabaseModule(com.fanap.podchat.persistance.module.AppDatabaseModule) JSONException(org.json.JSONException) SentryException(io.sentry.core.protocol.SentryException) IOException(java.io.IOException) JsonSyntaxException(com.google.gson.JsonSyntaxException) PodChatException(com.fanap.podchat.util.PodChatException) RoomIntegrityException(com.fanap.podchat.persistance.RoomIntegrityException)

Aggregations

RoomIntegrityException (com.fanap.podchat.persistance.RoomIntegrityException)1 AppDatabaseModule (com.fanap.podchat.persistance.module.AppDatabaseModule)1 AppModule (com.fanap.podchat.persistance.module.AppModule)1 PodChatException (com.fanap.podchat.util.PodChatException)1 JsonSyntaxException (com.google.gson.JsonSyntaxException)1 SentryException (io.sentry.core.protocol.SentryException)1 IOException (java.io.IOException)1 JSONException (org.json.JSONException)1