public boolean isActive() { try { InteractionConfiguration configuration = getConfiguration(); if (configuration != null && configuration.has(KEY_ACTIVE)) { return configuration.getBoolean(KEY_ACTIVE); } } catch (JSONException e) { logException(e); } return false; }
public boolean isShowPoweredBy() { try { if (!isNull(KEY_SHOW_POWERED_BY)) { return getBoolean(KEY_SHOW_POWERED_BY); } } catch (JSONException e) { logException(e); } return false; } }
public boolean getWhoCardRequired() { InteractionConfiguration configuration = getConfiguration(); if (configuration == null) { return false; } JSONObject profile = configuration.optJSONObject(KEY_PROFILE); return profile.optBoolean(KEY_PROFILE_REQUIRE, false); }
public String getValidationError() { return getConfiguration().optString(KEY_VALIDATION_ERROR, null); }
try { InteractionConfiguration configuration = getConfiguration(); if (configuration != null && configuration.has(KEY_QUESTIONS)) { List<Question> questions = new ArrayList<Question>(); JSONArray questionsArray = configuration.getJSONArray(KEY_QUESTIONS); for (int i = 0; i < questionsArray.length(); i++) { JSONObject questionJson = (JSONObject) questionsArray.get(i);
public boolean showDismissButton() { InteractionConfiguration configuration = getConfiguration(); if (configuration == null) { return false; } return configuration.optBoolean(KEY_SHOW_DISMISS_BUTTON, false); }
public InteractionConfiguration getConfiguration() { try { if (!isNull(KEY_CONFIGURATION)) { return new InteractionConfiguration(getJSONObject(KEY_CONFIGURATION).toString()); } } catch (JSONException e) { logException(e); } return new InteractionConfiguration(); }
public void clearContextualMessage() { JSONObject auto_msg = getContextualMessage(); if (auto_msg == null) { return; } try { auto_msg.put(KEY_AUTOMATED_MESSAGE_BODY, null); InteractionConfiguration configuration = getConfiguration(); configuration.put(KEY_AUTOMATED_MESSAGE, auto_msg); put(Interaction.KEY_CONFIGURATION, configuration); } catch (JSONException e) { logException(e); } }
public JSONObject getContextualMessage() { InteractionConfiguration configuration = getConfiguration(); if (configuration == null) { return null; } return configuration.optJSONObject(KEY_AUTOMATED_MESSAGE); }
public String getDismissText() { InteractionConfiguration configuration = getConfiguration(); if (configuration == null) { return null; } return configuration.optString(KEY_DISMISS_TEXT, null); } }
public boolean isShowSuccessMessage() { return getConfiguration().optBoolean(KEY_SHOW_SUCCESS_MESSAGE); }
public boolean isShowPoweredBy() { try { InteractionConfiguration configuration = getConfiguration(); if (configuration != null && configuration.has(KEY_SHOW_POWERED_BY)) { return configuration.getBoolean(KEY_SHOW_POWERED_BY); } } catch (JSONException e) { logException(e); } return false; }
public JSONObject getProfile() { InteractionConfiguration configuration = getConfiguration(); if (configuration == null) { return null; } return configuration.optJSONObject(KEY_PROFILE); }
public String getDescription() { return getConfiguration().optString(KEY_DESCRIPTION, null); }
public boolean isRequired() { return getConfiguration().optBoolean(KEY_REQUIRED); }