Google Play Services - adjust/cordova_sdk GitHub Wiki

Since the 1st of August of 2014, apps in the Google Play Store must use the Google Advertising ID to uniquely identify each device. To allow the adjust SDK to use the Google Advertising ID, you must integrate the Google Play Services.

The adjust SDK adds Google Play Services by default to your app.

If you are using Proguard, add these lines to your Proguard file:

-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}
-keep class com.adjust.sdk.plugin.MacAddressUtil {
    java.lang.String getMacAddress(android.content.Context);
}
-keep class com.adjust.sdk.plugin.AndroidIdUtil {
    java.lang.String getAndroidId(android.content.Context);
}
-keep class com.google.android.gms.common.ConnectionResult {
    int SUCCESS;
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
    com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
    java.lang.String getId();
    boolean isLimitAdTrackingEnabled();
}

If you don't want to use Google Play Services in your app, you can remove them by editing the plugin.xml file of the adjust SDK plugin. Go to the plugins/com.adjust.sdk folder and open the plugin.xml file. As part of the <platform name="android">, you can find the following line which adds the Google Play Services dependency:

<framework src="com.google.android.gms:play-services-analytics:+" />

Sometimes, it can happen that other Cordova plugins which you are using are also importing Google Play Services by default into your app. In this case, it can happen that Google Play Services from our SDk and other plugins conflict and cause build time errors for you. Google Play Services do not have to be present in your app as part of our SDK exclusively. As long as you have the analytics part of Google Play Services integrated in your app, our SDK will be able to read all needed information. In case you choose to add Google Play Services into your app as part of another Cordova plugin, you can simply remove above line from the plugin.xml file of our SDK.