use of com.fanap.podchat.requestobject.RequestLocationMessage in project pod-chat-android-sdk by FanapSoft.
the class ChatCore method mapStaticImage.
public String mapStaticImage(RequestMapStaticImage request) {
int zoom = request.getZoom();
int width = request.getWidth();
int height = request.getHeight();
String center = request.getCenter();
RequestLocationMessage requestLMsg = new RequestLocationMessage.Builder().height(height).width(width).center(center).zoom(zoom).build();
return mainMapStaticImage(requestLMsg, null, null, false, null);
}
use of com.fanap.podchat.requestobject.RequestLocationMessage in project pod-chat-android-sdk by FanapSoft.
the class ChatActivity method sendLocationMsg.
private void sendLocationMsg() {
String center = "35.7003510,51.3376472";
String meta = getMetaData();
RequestLocationMessage requestLocationMessage = new RequestLocationMessage.Builder().systemMetadata(meta).center(center).message("Im here now : ) ").setUserGroupHash(TEST_THREAD_HASH).activity(ChatActivity.this).threadId(TEST_THREAD_ID).build();
// presenter.sendLocationMessage(requestLocationMessage);
presenter.sendLocationMessage(requestLocationMessage, new ProgressHandler.sendFileMessage() {
@Override
public void onProgressUpdate(String uniqueId, int progress, int totalBytesSent, int totalBytesToSend) {
Log.d("MTAG", "Update progress: " + "Total Bytes sent: " + totalBytesSent + " Total Bytes left " + totalBytesToSend);
}
@Override
public void onFinishImage(String json, ChatResponse<ResultImageFile> chatResponse) {
Log.d("MTAG", "Finish upload");
}
@Override
public void onError(String jsonError, ErrorOutPut error) {
Log.d("MTAG", "Error upload");
}
});
}
Aggregations