You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: events not being sent when adTrackingEnabled is false (#1024)
* fix: to show 'Queue restoration timeout' only once
* fix: advertising id being sent for Android application installed events
* chore: add privacy manifest file to core package
* fix: events not being sent when adTrackingEnabled is false
* fix: type mismatch inferred type is String? but String was expected
* Revert "fix: type mismatch inferred type is String? but String was expected"
This reverts commit 2b1e1fc.
---------
Co-authored-by: Sunita Prajapati <>
Copy file name to clipboardExpand all lines: packages/plugins/plugin-advertising-id/android/src/main/java/com/reactnativeanalyticsreactnativepluginadvertisingid/AnalyticsReactNativePluginAdvertisingIdModule.kt
+41-36Lines changed: 41 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -18,42 +18,47 @@ class AnalyticsReactNativePluginAdvertisingIdModule(reactContext: ReactApplicati
18
18
return"AnalyticsReactNativePluginAdvertisingId"
19
19
}
20
20
21
-
@ReactMethod
21
+
@ReactMethod
22
22
fungetAdvertisingId(promise:Promise) {
23
-
if (currentActivity?.application ==null) {
24
-
promise.resolve(null)
25
-
return
26
-
}
27
-
28
-
val reactContext = (currentActivity?.application asReactApplication)
29
-
?.reactNativeHost
30
-
?.reactInstanceManager
31
-
?.currentReactContext
32
-
33
-
if (reactContext ==null) {
34
-
promise.resolve(null)
35
-
return
36
-
}
37
-
38
-
try {
39
-
val advertisingInfo =AdvertisingIdClient.getAdvertisingIdInfo(reactContext)
40
-
val isLimitAdTrackingEnabled = advertisingInfo.isLimitAdTrackingEnabled
0 commit comments