withIncludeBackgroundSessionsInMetrics method

Builder withIncludeBackgroundSessionsInMetrics([
  1. bool includeBackgroundSessionsInMetrics = true
])

Enables opting out of background sessions being counted towards total sessions.

Set includeBackgroundSessionsInMetrics true if this session should be added to total sessions/DAUs when application state is inactive or background. This API needs to be called before starting session.

Implementation

Builder withIncludeBackgroundSessionsInMetrics(
    [bool includeBackgroundSessionsInMetrics = true]) {
  builderAgent?.withIncludeBackgroundSessionsInMetrics(
      includeBackgroundSessionsInMetrics);
  return this;
}