I want to retrive messages for contact when i call this function
ApplozicConversation.getMessageListForContact(getAppContext(), contact.getContactIds(), null, new MessageListHandler() {
@Override
public void onResult(List<Message> messageList, ApplozicException e) {
if (e == null) {
listOfMessages.addAll(0, messageList);
listener.onResult(messageList, e);
} else {
listener.onResult(null, e);
}
}
});
messageList size is 235 i need to do pagination how can i limit result size ? i'm using following SDK version for Android.
com.applozic.communication.message:mobicomkit:5.34
Unfortunately, The limit in fetching message restriction is not there however we will think about adding it.
For now, You can use the workaround to import the source code By downloading the Applozic-Android-SDK from the GitHub project this link: https://github.com/AppLozic/Applozic-Android-SDK
Next, import the module
mobicomkit
from the downloaded GitHub project while importing it will showmobicomkit
andmobicommons
select both.then in your app
Build.gradle
file addapi project(':mobicomkit')
and make sure you remove the gradle dependencycom.applozic.communication.message:mobicomkit:5.34
from yourbuild.gradle
fileNext, you can open the file MessageDatabaseService.java file and find the method
then you will see the Cursor query there you can add the limit as below