Closed kennedyjosh closed 1 year ago
Hi @kennedyjosh, Based on my understanding, you are trying to track an event with event properties and each property has a different type. The type of event properties is hashMap. Please check the following example. Thanks.
// track event with event properties
amplitude.track("test event properties", new HashMap() {{
put("reason", "test event property value");
put("result", true);
}});
I have an event with two properties:
result
which is a booleanreason
which is a StringIn Kotlin, it seems you can have multiple key types in mutuableMap. However, my project is in Java, where you can't do such a thing (to my knowledge).
Is there a workaround to have both these properties associated with one event when using Java?
I've tried just passing result as a string, but the consequence of this is that
"true"
and"false"
show up as different values from booleanTrue
andFalse
when looking at the data to create analyses. Additionally, since theresult
prop is supposed to be a Boolean, Amplitude flags the events as invalid when it receives the string version.