Save Post
The LikeMinds Android feed SDK provides "Save Post" feature. You can integrate it in your Android app to enhance user experience by allowing them to bookmark and revisit their favorite posts at their convenience. Enable seamless content curation, empowering users to organize and access valuable information with ease.
Steps to save a post
- Create a SavePostRequest object using
SavePostRequest.Builder
class by passing all the required parameters. - Call
savePost()
function using the instance ofLMFeedClient
. - Process the response (
LMResponse<Nothing>
) as per your requirement.
CoroutineScope(Dispatchers.IO).launch {
// object of SavePostRequest
val savePostRequest = SavePostRequest.Builder()
.postId("ENTER POST ID") // id of the post saved
.build()
// get response (LMResponse<Nothing>)
val response = LMFeedClient.getInstance().savePost(savePostRequest)
if (response.success) {
// your function to process post saved action
processPostSaved()
} else {
// your function to process error message
processError(response.errorMessage)
}
}
Models
SavePostRequest
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
postId | String | Unique id of the post saved. |