ScreenName in XML configuration not working

I just added Google Analytics support to my application and I cannot get <screenName>the XML configuration to work:

Configuration:

<?xml version="1.0" encoding="utf-8" ?>
<resources>
    <screenName name="com...ActivityMain">Main</screenName>
    <screenName name="com...ActivitySettings">Settings</screenName>
</resources>

I make it clear, I have:

<meta-data android:name="com.google.android.gms.analytics.globalConfigResource" android:resource="@xml/analytics" />

And in the application, I have:

synchronized public Tracker getDefaultTracker() {
    if (mTracker == null) {
        final GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
        //analytics.setDryRun(BuildConfig.DEBUG);
        analytics.enableAutoActivityReports(this);
        // To enable debug logging use: adb shell setprop log.tag.GAv4 DEBUG
        mTracker = analytics.newTracker(R.xml.global_tracker);
        mTracker.enableAutoActivityTracking(true);
        mTracker.enableExceptionReporting(true);
    }
    return mTracker;
}

When I turn on VERBOSEdebug, I see this:

Loading global XML config values

But then this:

Hit delivery requested: ht=1442573034900, _s=78, _v=ma7.8.95, a=1607163793, aid=cz..., an=XXX, av=0.10.2+801d661, cd=com...ActivitySettings, cid=..., sc=start, sr=768x1184, t=screenview, tid=UA-XXX-2, ul=cs-cz, v=1

And as you can see, cdcontains the full name of the package.

+4
source share

Source: https://habr.com/ru/post/1607997/


All Articles