@Override public void onFinishComposing() { messagingActionHandler.sendEmptyMessage(MSG_REMOVE_COMPOSER); Util.hideSoftKeyboard(hostingActivityRef.get(), getView()); messagingActionHandler.sendEmptyMessage(MSG_SEND_PENDING_CONTEXT_MESSAGE); if (!TextUtils.isEmpty(composerEditText.getText().toString().trim()) || pendingAttachments.size() > 0) { CompoundMessage compoundMessage = new CompoundMessage(); compoundMessage.setBody(composerEditText.getText().toString().trim()); compoundMessage.setRead(true); compoundMessage.setCustomData(ApptentiveInternal.getInstance().getAndClearCustomData()); compoundMessage.setAssociatedImages(new ArrayList<ImageItem>(pendingAttachments)); ConversationProxy conversation = getConversation(); if (conversation != null && conversation.hasActiveState()) { compoundMessage.setSenderId(conversation.getPerson().getId()); } messagingActionHandler.sendMessage(messagingActionHandler.obtainMessage(MSG_START_SENDING, compoundMessage)); composingViewSavedState = null; composerEditText.getText().clear(); pendingAttachments.clear(); clearPendingComposingMessage(); } showFab(); showProfileButton(); }
String interactionIdToLaunch = null; for (Invocation invocation : invocations) { FieldManager fieldManager = new FieldManager(getContext(), getConversation().getVersionHistory(), getConversation().getEventData(), getConversation().getPerson(), getConversation().getDevice(), getConversation().getAppRelease()); if (invocation.isCriteriaMet(fieldManager, false)) { // TODO: should we print details here as well? interactionIdToLaunch = invocation.getInteractionId();