0

Link step to integration AppsFlyer to Project Android: https://support.appsflyer.com/hc/en-us/articles/207032126-AppsFlyer-SDK-Integration-Android

After following your step, everything go well on debug build but i have crash when build release, my project configured with proguard

-dontwarn com.appsflyer.**  
-dontwarn com.android.installreferrer  
-keep public class com.android.installreferrer.** { *; } 

I found issue in onInstallReferrerSetupFinished method && mReferrerClient.getInstallReferrer();

I don't know i'm wrong proguard config or Appsflyer sdk have problem with connect .AIDL These're logs from Fabric crash

Binder invocation to an incorrect interface android.os.Parcel.readException (Parcel.java:1599) com.android.installreferrer.api.InstallReferrerClientImpl.getInstallReferrer (Unknown Source) com.appsflyer.o.onInstallReferrerSetupFinished (Unknown Source)

Maxim Shoustin
  • 77,483
  • 27
  • 203
  • 225
Anh Vinh Huỳnh
  • 181
  • 5
  • 18

1 Answers1

0

See this documentation: support.appsflyer.com

In your proguard-rules file put:

-dontwarn com.android.installreferrer

In your Gradle file

implementation 'com.appsflyer:segment-android-integration:+'
implementation 'com.android.installreferrer:installreferrer:1.0'

In my case I am using appsflyer with segment so my code is:

Analytics analytics = new Analytics.Builder(context, BuildConfig.SEGMENT_KEY)
            .trackApplicationLifecycleEvents()
            .flushQueueSize(AnalyticsConstants.CONFIG.SEGMENT_QUEUE_SIZE)
            .use(AppsflyerIntegration.FACTORY)
            .build();

I hope this help you!

Tony Barajas
  • 124
  • 2
  • 12