Skip to main content

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

  1. Create a SavePostRequest object using SavePostRequest.Builder class by passing all the required parameters.
  2. Call savePost() function using the instance of LMFeedClient.
  3. 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

VARIABLETYPEDESCRIPTIONOPTIONAL
postIdStringUnique id of the post saved.