Skip to content

Commit

Permalink
fix: update Android usage of info -> customAttributes (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
willpassidomo authored May 19, 2022
1 parent 654eeb6 commit dc8830b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions plugin/src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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:+")
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -425,7 +425,7 @@ private static MPEvent ConvertMPEvent(JSONObject map) throws JSONException {
}
if (map.has("info")) {
Map<String, String> customInfo = ConvertStringMap(map.getJSONObject("info"));
builder.info(customInfo);
builder.customAttributes(customInfo);
}
if (map.has("customFlags")) {
Map<String, String> customFlags = ConvertStringMap(map.getJSONObject("customFlags"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit dc8830b

Please sign in to comment.