In my app I want to turn off all logs from Google Analytics in my release build. I'm constantly seeing logs like the following:
Hit delivery requested: ...specifics...
Hit sent to the device AnalyticsService for delivery
I've tried setting the logger to null, I've tried setting the log level to only errors. Any suggestions would be very helpful. Here's my initialization code.
boolean useAnalytics = MyApp.getBuildType().shouldUseAnalytics();
GoogleAnalytics ga = GoogleAnalytics.getInstance(mContext);
ga.setDryRun(!useAnalytics);
if (useAnalytics) {
ga.setLogger(null);
} else {
ga.getLogger().setLogLevel(Logger.LogLevel.VERBOSE);
}
tracker = ga.newTracker(mContext.getString(R.string.ga_app_trackerid));
tracker.enableAdvertisingIdCollection(true);
tracker.enableAutoActivityTracking(false);
tracker.setSessionTimeout(300);