override fun onEventReceived()

in app/src/main/java/com/amazonaws/services/chime/sdkdemo/fragment/MeetingFragment.kt [1971:1996]


    override fun onEventReceived(name: EventName, attributes: EventAttributes) {
        // Store the logs
        attributes.putAll(audioVideo.getCommonEventAttributes())
        postLogger.info(
            TAG, gson.toJson(
                mutableMapOf(
                    "name" to name,
                    "attributes" to attributes
                )
            )
        )

        logger.info(TAG, "$name ${attributes.toJsonString()}")
        when (name) {
            EventName.meetingStartSucceeded ->
                logger.info(
                    TAG,
                    "Meeting started on : ${audioVideo.getCommonEventAttributes().toJsonString()}"
                )
            EventName.meetingEnded, EventName.meetingFailed -> {
                logger.info(TAG, "Meeting history: ${gson.toJson(audioVideo.getMeetingHistory())}")
                postLogger.publishLog(TAG)
            }
            else -> Unit
        }
    }