use of com.microsoft.appcenter.analytics.channel.AnalyticsValidator in project mobile-center-sdk-android by Microsoft.
the class Analytics method startAppLevelFeatures.
/**
* Start features at app level, this is not done if only libraries started the service.
*/
@WorkerThread
private void startAppLevelFeatures() {
/* Share the started from app check between all calls. */
if (mStartedFromApp) {
/* Enable filtering logs. */
mAnalyticsValidator = new AnalyticsValidator();
mChannel.addListener(mAnalyticsValidator);
/* Start session tracker. */
mSessionTracker = new SessionTracker(mChannel, ANALYTICS_GROUP);
if (isManualSessionTrackerEnabled) {
mSessionTracker.enableManualSessionTracker();
}
mChannel.addListener(mSessionTracker);
/* If we are in foreground, make sure we send start session log now (and track page). */
if (mCurrentActivity != null) {
Activity activity = mCurrentActivity.get();
if (activity != null) {
processOnResume(activity);
}
}
/* Add new channel listener for transmission target. */
mAnalyticsTransmissionTargetListener = AnalyticsTransmissionTarget.getChannelListener();
mChannel.addListener(mAnalyticsTransmissionTargetListener);
}
}
Aggregations