@Override protected void execute() { conversation.addPayload(payload); } });
public void sendMessage(ApptentiveMessage apptentiveMessage) { messageStore.addOrUpdateMessages(apptentiveMessage); conversation.addPayload(apptentiveMessage); }
private static void sendEvent(EventPayload event) { checkConversationQueue(); Conversation conversation = ApptentiveInternal.getInstance().getConversation(); if (conversation != null) { conversation.addPayload(event); } else { ApptentiveLog.w(UTIL, "Unable to send event '%s': no active conversation", event); } } }
@Override protected void execute() { checkConversationQueue(); Device lastSentDevice = getLastSentDevice(); Device currentDevice = getDevice(); assertNotNull(currentDevice, "Current device object is null"); DevicePayload devicePayload = DeviceManager.getDiffPayload(lastSentDevice, currentDevice); if (devicePayload != null) { addPayload(devicePayload); setLastSentDevice(currentDevice != null ? currentDevice.clone() : null); } } };
public static synchronized boolean engage(Context context, Conversation conversation, String vendor, String interaction, String interactionId, String eventName, String data, Map<String, Object> customData, ExtendedData... extendedData) { checkConversationQueue(); if (context == null) { throw new IllegalArgumentException("Context is null"); } if (conversation == null) { throw new IllegalArgumentException("Conversation is null"); } Assert.assertTrue(ApptentiveInternal.isApptentiveRegistered()); if (!ApptentiveInternal.isApptentiveRegistered()) { return false; } try { String eventLabel = generateEventLabel(vendor, interaction, eventName); ApptentiveLog.i(INTERACTIONS, "Engage event: '%s'", eventLabel); String versionName = ApptentiveInternal.getInstance().getApplicationVersionName(); int versionCode = ApptentiveInternal.getInstance().getApplicationVersionCode(); conversation.getEventData().storeEventForCurrentAppVersion(Util.currentTimeSeconds(), versionCode, versionName, eventLabel); conversation.addPayload(new EventPayload(eventLabel, interactionId, data, customData, extendedData)); return doEngage(conversation, context, eventLabel); } catch (Exception e) { ApptentiveLog.e(INTERACTIONS, e, "Exception while engaging event '%s'", eventName); logException(e); } return false; }
conversation.addPayload(AppReleaseManager.getPayload(sdk, appRelease)); conversation.setAppRelease(appRelease); conversation.setSdk(sdk);
conversation.addPayload(new LogoutPayload()); } else if (notification.hasName(NOTIFICATION_AUTHENTICATION_FAILED)) { String conversationIdOfFailedRequest = notification.getUserInfo(NOTIFICATION_KEY_CONVERSATION_ID, String.class);