2014-06-27 131 views
1

在文件夾res/xml,我有一個包含此行的文件analytics.xml如何在Google Analytics中將日誌級別設置爲verbose?

<string name="ga_logLevel">verbose</string> 

然而,在我的ActivityonCreate()方法,我稱之爲:

GoogleAnalytics.getInstance(this).newTracker(R.xml.analytics); 
Log.d("abc",""+(GoogleAnalytics.getInstance(this).getLogger().getLogLevel() == Logger.LogLevel.VERBOSE)); 

輸出是假的,不真正。那爲什麼呢?

回答

4

這應該做的伎倆:

GoogleAnalytics.getInstance(this).getLogger().setLogLevel(LogLevel.VERBOSE); 
相關問題