diff --git a/android/src/main/java/com/yandex/metrica/plugin/reactnative/Utils.java b/android/src/main/java/com/yandex/metrica/plugin/reactnative/Utils.java index f85662f..93b5ad9 100644 --- a/android/src/main/java/com/yandex/metrica/plugin/reactnative/Utils.java +++ b/android/src/main/java/com/yandex/metrica/plugin/reactnative/Utils.java @@ -28,10 +28,11 @@ abstract class Utils { if (configMap.hasKey("name")) { userProfile.apply(Attribute.name().withValue(configMap.getString("name"))); } - if (configMap.hasKey("floor") && configMap.getString("floor") == "male") { + String floor = configMap.getString("floor"); + Log.w("TAG", floor); + if (configMap.hasKey("floor") && "male".equals(configMap.getString("floor"))) { userProfile.apply(Attribute.gender().withValue(GenderAttribute.Gender.MALE)); - } else if(configMap.hasKey("floor") && configMap.getString("floor") == "female") { - + } else if(configMap.hasKey("floor") && "female".equals(configMap.getString("floor"))) { userProfile.apply(Attribute.gender().withValue(GenderAttribute.Gender.FEMALE)); } if (configMap.hasKey("age")) { diff --git a/package.json b/package.json index 6ead7d3..f9e2928 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-native-appmetrica-next", "title": "Yandex AppMetrica React Native Plugin && AppMetricaPushSDK (fireBase CloudMessage)", - "version": "1.0.4", + "version": "1.0.5", "description": "React Native plugin for AppMetrica analytics tool", "main": "index.js", "scripts": {