Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update Android usage of info -> customAttributes #15

Merged
merged 1 commit into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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