0

I have sucsessfully integrate Google Analytics v4 in my android app. But the problem is he send data (statistics) only with Android 4.X ? i want to know if he work with OS version before 4.0 ? thanx.

Atef Daoud
  • 13
  • 3

1 Answers1

0

As mentioned in a note here:

https://developers.google.com/analytics/devguides/collection/android/v4/#before_begin

Note: 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.

combined with the text here which devices support the Google Play Services:

https://developer.android.com/google/play-services/index.html

The Google Play services APK is delivered through the Google Play Store, so updates to the services are not dependent on carrier or OEM system image updates. 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 the analytics should work on devices starting with Android 2.3.3

In my experience not all devices with 2.3.3 have the Google Play Services available. You can find it out by calling:

int analyticsAvailability = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);
boolean analyticsAvailable = (analyticsAvailability == ConnectionResult.SUCCESS);
Simon Meyer
  • 1,946
  • 12
  • 23
  • when i run it on 4.2.2 it work fine , but if I run it on android 2.3.3 i have this error : "Could not find class 'com.google.android.gms" – Atef Daoud May 27 '14 at 10:58
  • Ok - i don't get that error on my android 2.3.3 phones - did you include the play services as a library project to your main project? – Simon Meyer May 27 '14 at 15:02