Firebase Remote Config Conditions Country/Region is not detected
Asked Answered
M

1

6

I'm trying to implement Firebase Remote Config for some features to control them remotely. The problem I'm facing here is that the country condition I'm setting up is not working as expected. To test this, I'm experimenting by using VPN to change the device IP. The documentation says that country is detected from IP address of the device, but it's not working. Anybody clue?

Mucky answered 15/1, 2019 at 8:51 Comment(2)
"This rule evaluates to true for a given app instance if the instance is in any of the regions or countries listed. On Android, the country code is derived from the Locale property. On iOS, it is derived from the countryCode property." Check the country by the code: String locale = context.getResources().getConfiguration().locale.getCountry(); Maybe the getCountry() returns different country with your current countryFoliar
did you find a solution to this problem?Helicograph
G
0

I was also facing the same issue then I figured out the root cause

In firebase remote config I had two condition one with platform = android and other with platform = android && location = "UK".

So it was taking the value always from 1st condition for location UK too.

Solution: Modify 1st condition to platform = android & location = "Current Country"

Gay answered 3/12, 2021 at 13:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.