flagship-io / flagship-android

Flagship Android library for implementing campaigns in your native Android app.
Apache License 2.0
7 stars 2 forks source link

Default value is picked for modifications #4

Closed damiafuentes closed 2 years ago

damiafuentes commented 2 years ago

Default value is picked for all modifications starting on November 10th. Before that date everything was working correctly. I am not sure how to debug the library to be able to provide more information. However, that is happening to all of our users where before it wasn't happening.

guillaumejacquart commented 2 years ago

Hey @damiafuentes thanks for bringing that issue to us. Could you tell us for which account you encountered this issue (or environment ID) ? We need that information to check the use cases setup in the platform.

damiafuentes commented 2 years ago

I've added logs and found this error:

Flagship.getModification("is_social_logins_enabled", false)
Flagship.getValue "is_social_logins_enabled"  types are different. Default value is returned.

When Flagship is retrieving the modifications the data is downloaded correctly. For that specific key the logs print:

is_social_logins_enabled=Modification(key=is_social_logins_enabled,
campaignId=c5gbbb67b6e2l79md7b0,
variationGroupId=c66l1k4h8hb02dnrm25g,
variationId=c66l1k4h8hb02dnrm260,
variationReference=false,
value={
  "type": "boolean",
  "value": true
})
damiafuentes commented 2 years ago

Looks like the API response has changed from returning a boolean to return a JSONObject.