Open a comment creation experience
Provide users a way to create and post comments
The Android SDK provides two approaches for creating a new comment.
Approach | Description |
---|---|
Comment Creation Screen | Opens a comment creation screen When implemented, a user sees the comment creation screen directly above the full Conversation screen. |
Floating Comment Creation View | Enables creating a comment without leaving the Conversation When implemented, a user sees floating keyboard with which a comment can be added. |
When the Conversation is in
readOnlyMode
, only the Conversation screen will be shown and the new comment screen won't open.
Open a comment creation screen
Use the following step to configure the Conversation:
- In
onCreate()
of an article activity, add the create comment to theActivity
.
SpotIm.getCreateCommentIntent(context, CONVERSATION_ID, object :
SpotCallback<Intent> {
override fun onSuccess(intent: Intent) {
startActivity(intent)
}
override fun onFailure(exception: SpotException) {
//Handle error here
}
})
Open the floating comment creation view
Use the following step to configure the Conversation:
- When defining the
CommentCreationStyle
, selectOWCommentCreationStyle.Floating
.
ConversationOptions.Builder() .setCommentCreationStyle(OWCommentCreationStyle.Floating) ... .build()
Updated 11 months ago