Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Created March 23, 2018 18:39
Show Gist options
  • Save adrianhall/975f2513997ef0d485a2a38ad0d92b66 to your computer and use it in GitHub Desktop.
Save adrianhall/975f2513997ef0d485a2a38ad0d92b66 to your computer and use it in GitHub Desktop.
Record a custom event with Amazon Pinpoint
fab.setOnClickListener { view ->
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show()
pinpointManager?.let {
val event = it.analyticsClient.createEvent("click-fab")
it.analyticsClient.recordEvent(event)
it.analyticsClient.submitEvents()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment