flutter-segment icon indicating copy to clipboard operation
flutter-segment copied to clipboard

advertising_id not being picked up in segment context

Open fpun opened this issue 3 years ago • 2 comments

Context I am trying to send app events from an Android app developed in Flutter to Facebook by using the flutter-segment library.

Config I have checked that I use Advertising ID on the Play Console in the App Content section I have added <uses-permission android:name="com.google.android.gms.permission.AD_ID"/> to the manifest

Issue When running my app locally with Android Studio Emulator in debug mode with "flutter run", advertising_id is surfaced correctly in the segment context object. However when running the app locally in the same conditions but in release mode with "flutter run --release" (or deploying the app to the Play Store), advertising_id is missing from the context.

Am I missing anything?

fpun avatar Jan 07 '23 22:01 fpun

I have the same problem but clevertap

AjleyArroyo avatar Mar 10 '23 21:03 AjleyArroyo

Context I am trying to send app events from an Android app developed in Flutter to Facebook by using the flutter-segment library.

Config I have checked that I use Advertising ID on the Play Console in the App Content section I have added <uses-permission android:name="com.google.android.gms.permission.AD_ID"/> to the manifest

Issue When running my app locally with Android Studio Emulator in debug mode with "flutter run", advertising_id is surfaced correctly in the segment context object. However when running the app locally in the same conditions but in release mode with "flutter run --release" (or deploying the app to the Play Store), advertising_id is missing from the context.

Am I missing anything?

Add implementation 'com.google.android.gms:play-services-ads-identifier:16+'' or greater version to the dependencies section of your build.gradle file. You might already have it.

Add the following line in your Proguard settings: XML

-keep class com.google.android.gms.ads.identifier.** { *; }

AjleyArroyo avatar Jun 02 '23 14:06 AjleyArroyo