Search in sources :

Example 1 with RequestLocationMessage

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);
}
Also used : RequestLocationMessage(com.fanap.podchat.requestobject.RequestLocationMessage)

Example 2 with RequestLocationMessage

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");
        }
    });
}
Also used : ResultImageFile(com.fanap.podchat.model.ResultImageFile) ProgressHandler(com.fanap.podchat.ProgressHandler) ErrorOutPut(com.fanap.podchat.model.ErrorOutPut) RequestLocationMessage(com.fanap.podchat.requestobject.RequestLocationMessage)

Aggregations

RequestLocationMessage (com.fanap.podchat.requestobject.RequestLocationMessage)2 ProgressHandler (com.fanap.podchat.ProgressHandler)1 ErrorOutPut (com.fanap.podchat.model.ErrorOutPut)1 ResultImageFile (com.fanap.podchat.model.ResultImageFile)1