ApptentiveLog.v(UTIL, "Sending Error Metric: %s, data: %s", type.getLabelName(), data.toString()); EventPayload event = new EventPayload(type.getLabelName(), data); sendEvent(event);
public static void sendMetric(final EventPayload.EventLabel type, final String trigger, final Map<String, String> data) { if (!isConversationQueue()) { dispatchOnConversationQueue(new DispatchTask() { @Override protected void execute() { sendMetric(type, trigger, data); } }); return; } Configuration config = Configuration.load(); if (config.isMetricsEnabled()) { ApptentiveLog.v(UTIL, "Sending Metric: %s, trigger: %s, data: %s", type.getLabelName(), trigger, data != null ? data.toString() : "null"); EventPayload event = new EventPayload(type.getLabelName(), trigger); event.putData(data); sendEvent(event); } }
private void onAppExit(final Context appContext) { checkConversationQueue(); if (isConversationActive()) { engageInternal(appContext, EventPayload.EventLabel.app__exit.getLabelName()); getConversation().endSession(); } }
private void onAppLaunch(final Context appContext) { checkConversationQueue(); if (isConversationActive()) { Conversation conversation = getConversation(); if (!conversation.hasSession()) { conversation.startSession(); } engageInternal(appContext, EventPayload.EventLabel.app__launch.getLabelName()); } }