diff --git a/plugin/src/android/build.gradle b/plugin/src/android/build.gradle index 16fdc51..7145b2d 100644 --- a/plugin/src/android/build.gradle +++ b/plugin/src/android/build.gradle @@ -20,11 +20,11 @@ repositories { dependencies { compileOnly("org.apache.cordova:framework:10.1.2") - compileOnly("com.mparticle:android-core:5.38.1") + compileOnly("com.mparticle:android-core:+") testImplementation("junit:junit:4.13.2") testImplementation("org.json:json:20220320") testImplementation("org.mockito:mockito-core:4.5.1") testImplementation("org.apache.cordova:framework:10.1.2") - testImplementation("com.mparticle:android-core:5.38.1") + testImplementation("com.mparticle:android-core:+") } diff --git a/plugin/src/android/src/main/java/com/mparticle/cordova/MParticleCordovaPlugin.java b/plugin/src/android/src/main/java/com/mparticle/cordova/MParticleCordovaPlugin.java index c629795..ceb7f75 100644 --- a/plugin/src/android/src/main/java/com/mparticle/cordova/MParticleCordovaPlugin.java +++ b/plugin/src/android/src/main/java/com/mparticle/cordova/MParticleCordovaPlugin.java @@ -107,7 +107,7 @@ public void logEvent(final JSONArray args) throws JSONException { MParticle.EventType eventType = ConvertEventType(type); MPEvent event = new MPEvent.Builder(name, eventType) - .info(attributes) + .customAttributes(attributes) .build(); MParticle.getInstance().logEvent(event); @@ -425,7 +425,7 @@ private static MPEvent ConvertMPEvent(JSONObject map) throws JSONException { } if (map.has("info")) { Map customInfo = ConvertStringMap(map.getJSONObject("info")); - builder.info(customInfo); + builder.customAttributes(customInfo); } if (map.has("customFlags")) { Map customFlags = ConvertStringMap(map.getJSONObject("customFlags")); diff --git a/plugin/src/android/src/test/java/com/mparticle/cordova/MParticleCordovaTests.java b/plugin/src/android/src/test/java/com/mparticle/cordova/MParticleCordovaTests.java index 5e971b4..4e539c6 100644 --- a/plugin/src/android/src/test/java/com/mparticle/cordova/MParticleCordovaTests.java +++ b/plugin/src/android/src/test/java/com/mparticle/cordova/MParticleCordovaTests.java @@ -89,7 +89,7 @@ public void testLogEvent() throws Exception { attributes.put("Test key", "Test value"); info.put("Test key", "Test value"); MPEvent event = new MPEvent.Builder(eventName, eventType) - .info(attributes) + .customAttributes(attributes) .build(); MParticleCordovaPlugin plugin = new MParticleCordovaPlugin();