예제 #1
0
        void onPrivateRoomMessage(AndroidJavaObject chatRoom, AndroidJavaObject messageAJO)
        {
            var privateChatRoom = new PrivateChatRoomAndroidImpl(chatRoom);
            var message         = AndroidChatUtils.ChatMessageFromJavaObject(messageAJO);

            MainThreadExecutor.Queue(() => onPrivateRoomMessageAction(privateChatRoom, message));
        }
예제 #2
0
 public void SetTypingStatus(TypingStatus typingStatus, Action onSuccess, Action <string> onFailure)
 {
     AndroidUtils.RunOnUiThread(() =>
     {
         chatRoomJavaObject.Call("setTypingStatus",
                                 AndroidChatUtils.GetTypingStatusAJO(typingStatus),
                                 new OperationVoidCallbackProxy(onSuccess, onFailure));
     });
 }
예제 #3
0
 public void SendMessage(ChatMessageContent messageContent, Action onSuccess, Action <string> onFailure)
 {
     AndroidUtils.RunOnUiThread(() =>
     {
         chatRoomJavaObject.Call("sendMessage",
                                 AndroidChatUtils.CreateChatMessageContentAJO(messageContent.MessageText),
                                 new OperationVoidCallbackProxy(onSuccess, onFailure));
     });
 }
예제 #4
0
        void onPrivateRoomTypingStatus(AndroidJavaObject chatRoom,
                                       AndroidJavaObject userAJO,
                                       AndroidJavaObject typingStatusAJO)
        {
            var privateChatRoom = new PrivateChatRoomAndroidImpl(chatRoom);
            var user            = AndroidUtils.UserFromJavaObj(userAJO);
            var typingStatus    = AndroidChatUtils.TypingStatusFromAJO(typingStatusAJO);

            MainThreadExecutor.Queue(() => onPrivateRoomTypingStatusAction(privateChatRoom, user, typingStatus));
        }