use of com.fanap.podchat.requestobject.RequestReplyFileMessage in project pod-chat-android-sdk by FanapSoft.
the class ChatActivity method replyFileMessage.
private void replyFileMessage() {
String messageContent = "Hello! just be happy!! : ) ";
long threadId = TEST_THREAD_ID;
long messageId = 114334;
Uri fileUri = getUri();
Inviter inviter = new Inviter();
inviter.setName("Sample Name for meta data test");
String meta = gson.toJson(inviter);
RequestReplyFileMessage fileMessage = new RequestReplyFileMessage.Builder(messageContent, threadId, messageId, fileUri, this, // required
TextMessageType.Constants.POD_SPACE_PICTURE).systemMetaData(meta).setUserGroupHashCode(// required
TEST_THREAD_HASH).setImageHc("200").setImageWc("100").setImageXc("5").setImageYc("5").build();
presenter.replyFileMessage(fileMessage, new ProgressHandler.sendFileMessage() {
@Override
public void onProgressUpdate(String uniqueId, int progress, int totalBytesSent, int totalBytesToSend) {
Log.e("CHAT_SDK_UPLOAD", "Progress %" + progress);
}
});
}
Aggregations