void onPrivateRoomMessage(AndroidJavaObject chatRoom, AndroidJavaObject messageAJO) { var privateChatRoom = new PrivateChatRoomAndroidImpl(chatRoom); var message = AndroidChatUtils.ChatMessageFromJavaObject(messageAJO); MainThreadExecutor.Queue(() => onPrivateRoomMessageAction(privateChatRoom, message)); }
public void SetTypingStatus(TypingStatus typingStatus, Action onSuccess, Action <string> onFailure) { AndroidUtils.RunOnUiThread(() => { chatRoomJavaObject.Call("setTypingStatus", AndroidChatUtils.GetTypingStatusAJO(typingStatus), new OperationVoidCallbackProxy(onSuccess, onFailure)); }); }
public void SendMessage(ChatMessageContent messageContent, Action onSuccess, Action <string> onFailure) { AndroidUtils.RunOnUiThread(() => { chatRoomJavaObject.Call("sendMessage", AndroidChatUtils.CreateChatMessageContentAJO(messageContent.MessageText), new OperationVoidCallbackProxy(onSuccess, onFailure)); }); }
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)); }