Integrated huanxin FAQs
Integrated Information Environment
1. to integrate the huanxin sdk, you need to write your own UI and implement various related message sending, callback, and listening interfaces. 2. integrates the EaseUI library. In this way, you do not need to write the UI layout by yourself, which encapsulates common functions.
Solution 1
1. The message is successfully sent in debug mode, but the message callback method onMessageReceived does not run. Solution: Check whether the message is registered in this activity:
@ Override protected void onResume () {super. onResume (); // register the message EMClient. getInstance (). chatManager (). addMessageListener (this) ;}@ Override protected void onDestroy () {super. onDestroy (); // remove the message EMClient. getInstance (). chatManager (). removeMessageListener (this );}
2. the problem after the above steps is that the message sent from the new background can be received through the onMessageReceived callback method, but the message sent by other accounts does not follow the onMessageReceived callback method and cannot be accepted. solution: 1. Check whether the chat mode is single-chat EMMessage. chatType. chat 2 ensures that the Chat object is registered through the same registration channel, that is, to open the background of the email, search for the IM user under the project to see if the account exists
Solution 2
1. this integration method is relatively simple. Generally, there is no problem according to the development documentation, but note that when the Chat cannot connect to the other party, the first is to check whether the chat mode is single chat, and the second is to ensure that the chat object is registered through the same registration channel, that is, to open the background of huanxin, search for an IM user in this project to see if the account exists.