private static boolean canShowInteraction(Conversation conversation, String eventLabel) { checkConversationQueue(); if (conversation == null) { throw new IllegalArgumentException("Conversation is null"); } Interaction interaction = conversation.getApplicableInteraction(eventLabel, false); return interaction != null; }
private static boolean doEngage(Conversation conversation, Context context, String eventLabel) { checkConversationQueue(); Interaction interaction = conversation.getApplicableInteraction(eventLabel, true); if (interaction != null) { String versionName = ApptentiveInternal.getInstance().getApplicationVersionName(); int versionCode = ApptentiveInternal.getInstance().getApplicationVersionCode(); conversation.getEventData().storeInteractionForCurrentAppVersion(Util.currentTimeSeconds(), versionCode, versionName, interaction.getId()); launchInteraction(context, interaction); return true; } ApptentiveLog.d(INTERACTIONS, "No interaction to show for event: '%s'", eventLabel); return false; }