amplitude / Amplitude-Android

Native Android SDK for Amplitude
MIT License
164 stars 90 forks source link

Custom User Properties Not Updated #384

Open 3a4or opened 1 year ago

3a4or commented 1 year ago

I have A feature flag on my Amlitude portal and I added a segment with custom user property to this feature flag so it is on or off depending on this segment, the problem is the feature flag is always on even if I change the value of the user property to makes the flag off. For more clarification find the following example:| I have a feature flag called "new-feature" with a segment where it's a custom user property "isNewFeatureSeen" is none, this means this flag will be on for any user that didn't change the value of "isNewFeatureSeen", now I changed the value from my Android app with the following code: val eventProperties = JSONObject().put("isNewFeatureSeen", "yes") Amplitude.getInstance().setUserProperties(eventProperties) Amplitude.getInstance().identify(Identify().set("isNewFeatureSeen", "yes")) Amplitude.getInstance().logEvent("sync", eventProperties)

after calling this code the feature flag "new-feature" was supposed to be off the next run of my Android app but it always returned on and sometimes after waiting too much time (between 2 to 120 mins) it returned on as expected, so this strange behavior and I don't know where is the problem, so any help about this?

for more information: my Experiment builder is: ExperimentUser.builder() .userId("my userId") .build()

My ExperimentClient: initializeWithAmplitudeAnalytics(context as Application, "my key", ExperimentConfig())

thanks in advance and looking forward to hearing from you soon.

Mercy811 commented 1 year ago

Hi @3a4or, could you provide the following information so that dive deep into what was happening there:

3a4or commented 1 year ago

Hi @Mercy811 I sent the required information to your email (xinyi.ye@amplitude.com)

3a4or commented 1 year ago

Hi @Mercy811 Any updates?