Created
October 15, 2019 06:10
-
-
Save veena14cs/261e76531c31711b1ae7bb907a90dc4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun subscribeToCurrentState() { | |
ephemeralStateLiveData.observe(fragment, Observer<EphemeralState> { result -> | |
logger.d("StateFragment", "getCurrentState: ${result.state.name}") | |
val customizationArgsMap: Map<String, InteractionObject> = result.state.interaction.customizationArgsMap | |
val allKeys: Set<String> = customizationArgsMap.keys | |
for (key in allKeys) { | |
logger.d("StateFragment", key) | |
} | |
if (customizationArgsMap.contains("choices")) { | |
val customizationArgs: InteractionObject? = customizationArgsMap.get("choices") | |
val stringList :StringList= customizationArgs!!.setOfHtmlString | |
logger.d("StateFragment", "value: ${stringList.htmlCount}") | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment