From 72bfee551c29a6aee32e9dbf3eace2f69ab4c67d Mon Sep 17 00:00:00 2001 From: Chris M Date: Tue, 15 Sep 2026 10:32:27 -0700 Subject: [PATCH] feat: add Alexa to PlatformEnum --- CHANGELOG.md | 4 ++++ .../java/com/mparticle/model/DeviceInformation.java | 3 ++- src/test/java/com/mparticle/client/EventsApiTest.java | 10 ++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41f920a..e3cb613 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add Alexa to `DeviceInformation.PlatformEnum`. + ## [2.8.0] - 2026-09-03 ### Added diff --git a/src/main/java/com/mparticle/model/DeviceInformation.java b/src/main/java/com/mparticle/model/DeviceInformation.java index 1e696a7..be87770 100644 --- a/src/main/java/com/mparticle/model/DeviceInformation.java +++ b/src/main/java/com/mparticle/model/DeviceInformation.java @@ -52,6 +52,8 @@ public enum PlatformEnum { ROKU("roku"), OUT_OF_BAND("out_of_band"), + + ALEXA("alexa"), SMART_TV("smart_tv"), @@ -1291,4 +1293,3 @@ private String toIndentedString(java.lang.Object o) { } } - diff --git a/src/test/java/com/mparticle/client/EventsApiTest.java b/src/test/java/com/mparticle/client/EventsApiTest.java index 121a63e..a67b4be 100644 --- a/src/test/java/com/mparticle/client/EventsApiTest.java +++ b/src/test/java/com/mparticle/client/EventsApiTest.java @@ -48,6 +48,16 @@ public void deviceInformationSupportsSamsungTvTizenAdvertisingId() { Assert.assertEquals(tizenAdvertisingId, parsedDeviceInformation.getTizenAdvertisingId()); } + @Test + public void deviceInformationSupportsAlexa() { + DeviceInformation deviceInformation = new DeviceInformation() + .platform(DeviceInformation.PlatformEnum.ALEXA); + + Assert.assertEquals("alexa", DeviceInformation.PlatformEnum.ALEXA.getValue()); + Assert.assertEquals(DeviceInformation.PlatformEnum.ALEXA, DeviceInformation.PlatformEnum.fromValue("alexa")); + Assert.assertEquals(DeviceInformation.PlatformEnum.ALEXA, deviceInformation.getPlatform()); + } + @Test public void logStringWtihLogger() { Logger.setLogHandler(new DefaultLogHandler());