I have been using Google Analytics SDK for Android V3 in my apps so far, and it has been working fine (My Apps are supported on Android 3.0 and above). Now the V3 has been deprecated, and the latest one is Google Analytics SDK v4 for Android.
I was able to get it to work by reading the official documentation along with this blog post. But I still have a few questions:
1) What is a Global Tracker and an App Tracker? What is the concept behind it? If I have more than one Android Apps, then whats the difference. Should all my apps have the same Global Tracker? is it 'global' in that sense? I am a little clueless here.
2) The V4 uses Google Play Services V4.3 and above, and does not have a Standalone Library like V3 had. So, is it safe to remove the V3 library jar file and the code? The Google Developers page does say this:
The SDK can be used and will work on devices that do not have Google Play Services. In this case the SDK will will automatically fall back to local dispatching.
Also
In general, devices running Android 2.3 (Gingerbread) or later and have the Google Play Store app installed receive updates within a few days. This allows you to use the newest APIs in Google Play services and reach most of the devices in the Android ecosystem (devices older than Android 2.3 or devices without the Google Play Store app are not supported).
So with V4, will my app tracking still work on all the devices which may not have the Google Play Services V4.3 or above? If not, then will the app crash on account of not finding a particular class needed by the analytics code? Or, Is it safe to assume that all devices with Android 2.3+ will be compatible with Analytics V4?
Note: The Google Play Services documentation page does show how to check if Google Play Services are available. But I don't want to prompt the user unnecessarily as the analytics does not affect the functionality of my app. Also, I can put a check, but I don't want to miss on any analytics information.
1) What is a Global Tracker and an App Tracker? What is the concept behind it? If I have more than one Android Apps, then whats the difference. Should all my apps have the same Global Tracker? is it 'global' in that sense? I am a little clueless here.
They are pretty much the same thing. Just configured in different ways to serve as example. You might want to use both if you have several apps, so that you have each app tracked to it's own Google Analytics Property and also to a global property that rolls up all data. But the tracker objects are exactly the same. Most of the time you just use one or the other. So ignore that part from the docs, and read them as examples only on how to setup trackers. Choose one and stick to it. I would recommend the xml configuration method, which is cleaner.
2) The V4 uses Google Play Services V4.3 and above, and does not have a Standalone Library like V3 had. So, is it safe to remove the V3 library jar file and the code? The Google Developers page does say this
Yes. Safe to remove. Any Android device above 2.2 will have Play Services installed. You might want to check if it's not available to just skip tracking altogether in your app.