Closed RyanNewsom closed 2 years ago
we are trying to make it more general. as you can see from the code, we have not only google ads id, but also amazon fire. we could have more. the idea is to avoid adding unnecessary dependencies to the sdk, since not everyone take the use of ads id. however, in our new analytics-kotlin library, we segregate ads id task to a plugin, so user decide to import it or not by their choice, and of course, no reflection there. it is encouraged to migrate to the kotlin library, since it is 2x faster with 2x less resources and fully coroutine based.
https://github.com/segmentio/analytics-android/blob/master/analytics/src/main/java/com/segment/analytics/GetAdvertisingIdTask.java#L52-L55
This requires us to add a pro-guard rule to prevent obfuscation so that we can get advertising id. Curious why this is built in this fashion?