@Override
public void handleInteractionNotificationAction(Context context, String channelId, Intent intent) {
String action = intent.getAction();
String interactionString = intent.getStringExtra(NOTIFICATION_EXTRA_INTERACTION_DEFINITION);
TextModalInteraction interaction;
try {
interaction = new TextModalInteraction(intent.getStringExtra(NOTIFICATION_EXTRA_INTERACTION_DEFINITION));
} catch (JSONException e) {
ApptentiveLog.w(NOTIFICATION_INTERACTIONS, "Unable to parse interaction: %s", interactionString);
logException(e);
return;
}
if (StringUtils.equal(action, NOTIFICATION_ACTION_DISPLAY)) {
actionDisplayNotification(context, channelId, interaction);
} else if (StringUtils.equal(action, NOTIFICATION_ACTION_DELETE)) {
actionDelete(context, interaction);
} else if (StringUtils.equal(action, NOTIFICATION_ACTION_NOTE_BUTTON_PRESSED)) {
actionButtonPressed(context, intent, interaction);
} else {
ApptentiveLog.w(NOTIFICATION_INTERACTIONS, "Unsupported action %s for Interaction type %s", action, interaction.getType().name());
}
}