Search in sources :

Example 1 with SafeHTTPService

use of com.letscooee.network.SafeHTTPService in project cooee-android-sdk by letscooee.

the class CooeeFactory method init.

public static synchronized void init(Context context) {
    if (initialized) {
        return;
    }
    appInfo = AppInfo.getInstance(context);
    deviceInfo = DeviceInfo.getInstance(context);
    manifestReader = ManifestReader.getInstance(context);
    sentryHelper = new SentryHelper(context, appInfo, manifestReader);
    sentryHelper.init();
    // Sentry should be initialized first
    ITransaction transaction = Sentry.startTransaction("CooeeFactory.init()", "task");
    baseHTTPService = new BaseHTTPService(context);
    // This is required in PendingTaskService (ultimately). TODO make this a strong dependency
    deviceAuthService = new DeviceAuthService(context, sentryHelper, manifestReader);
    deviceAuthService.populateUserDataFromStorage();
    pendingTaskService = new PendingTaskService(context, sentryHelper);
    runtimeData = RuntimeData.getInstance(context);
    sessionManager = SessionManager.getInstance(context);
    safeHTTPService = new SafeHTTPService(context, pendingTaskService, sessionManager, runtimeData);
    transaction.finish();
    initialized = true;
}
Also used : SafeHTTPService(com.letscooee.network.SafeHTTPService) DeviceAuthService(com.letscooee.retrofit.DeviceAuthService) SentryHelper(com.letscooee.utils.SentryHelper) ITransaction(io.sentry.ITransaction) BaseHTTPService(com.letscooee.network.BaseHTTPService) PendingTaskService(com.letscooee.room.task.PendingTaskService)

Aggregations

BaseHTTPService (com.letscooee.network.BaseHTTPService)1 SafeHTTPService (com.letscooee.network.SafeHTTPService)1 DeviceAuthService (com.letscooee.retrofit.DeviceAuthService)1 PendingTaskService (com.letscooee.room.task.PendingTaskService)1 SentryHelper (com.letscooee.utils.SentryHelper)1 ITransaction (io.sentry.ITransaction)1