use of com.microsoft.appcenter.ingestion.models.json.DefaultLogSerializer in project mobile-center-sdk-android by Microsoft.
the class AppCenter method finishConfiguration.
@WorkerThread
private void finishConfiguration() {
/* Load some global constants. */
Constants.loadFromContext(mApplication);
/* If parameters are valid, init context related resources. */
StorageHelper.initialize(mApplication);
/* Initialize session storage. */
SessionContext.getInstance();
/* Get enabled state. */
boolean enabled = isInstanceEnabled();
/* Init uncaught exception handler. */
mUncaughtExceptionHandler = new UncaughtExceptionHandler();
if (enabled) {
mUncaughtExceptionHandler.register();
}
/* Init channel. */
mLogSerializer = new DefaultLogSerializer();
mLogSerializer.addLogFactory(StartServiceLog.TYPE, new StartServiceLogFactory());
mLogSerializer.addLogFactory(CustomPropertiesLog.TYPE, new CustomPropertiesLogFactory());
mChannel = new DefaultChannel(mApplication, mAppSecret, mLogSerializer, mHandler);
mChannel.setEnabled(enabled);
mChannel.addGroup(CORE_GROUP, DEFAULT_TRIGGER_COUNT, DEFAULT_TRIGGER_INTERVAL, DEFAULT_TRIGGER_MAX_PARALLEL_REQUESTS, null);
if (mLogUrl != null) {
mChannel.setLogUrl(mLogUrl);
}
if (!enabled) {
NetworkStateHelper.getSharedInstance(mApplication).close();
}
AppCenterLog.debug(LOG_TAG, "App Center storage initialized.");
}
Aggregations