VegeFruits v7.1版本的 MD5 值为:2ff167dfba698c783e879938fe00b9ce
以下内容为反编译后的 IronbeastEventsFormatter.java 源代码,内容仅作参考
package com.ironsource.mediationsdk.events;
import com.ironsource.eventsmodule.EventData;
import java.util.ArrayList;
import java.util.Iterator;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class IronbeastEventsFormatter extends AbstractEventsFormatter {
private final String DEFAULT_IB_EVENTS_URL = "https://track.atom-data.io";
private final String IB_TABLE_NAME = "super.dwh.mediation_events";
private final String IB_KEY_TABLE = "table";
private final String IB_KEY_DATA = "data";
public IronbeastEventsFormatter(int adUnit) {
this.mAdUnit = adUnit;
}
@Override
public String getDefaultEventsUrl() {
return "https://track.atom-data.io";
}
@Override
public String getFormatterType() {
return EventsFormatterFactory.TYPE_IRONBEAST;
}
@Override
public String format(ArrayList<EventData> toSend, JSONObject generalProperties) {
JSONObject jsonBody = new JSONObject();
if (generalProperties == null) {
this.mGeneralProperties = new JSONObject();
} else {
this.mGeneralProperties = generalProperties;
}
try {
JSONArray eventsArray = new JSONArray();
if (toSend != null && !toSend.isEmpty()) {
Iterator<EventData> it = toSend.iterator();
while (it.hasNext()) {
EventData event = it.next();
JSONObject jsonEvent = createJSONForEvent(event);
if (jsonEvent != null) {
eventsArray.put(jsonEvent);
}
}
}
jsonBody.put("table", "super.dwh.mediation_events");
jsonBody.put("data", createDataToSend(eventsArray));
} catch (JSONException e) {
e.printStackTrace();
}
return jsonBody.toString();
}
}