Official documents
If you use Imkit, the dialog layout can be done without your own
First import the Imkit module, configured, in the module's manifest file, search for host, I found 2, replace * with the package name of their own project, the other search Rong_cloud_app_key, the value of the console to the KEY
In the session interface to create a conversationactivity its layout conversation inside the fragment is fixed direct copy can, you can get a Actionbar or toolbar display the title
Then configure conversationactivity in the manifest file the following is the official document code
The 13th row of host must be changed to its own package name
1<!--session interface--2<Activity3Android:name="io.rong.fast.activity.ConversationActivity"4android:screenorientation="Portrait"5Android:windowsoftinputmode="statehidden|adjustresize">6 7<intent-filter>8<action android:name="Android.intent.action.VIEW"/>9 Ten<category android:name="Android.intent.category.DEFAULT"/> One A<Data -android:host="Io.rong.fast" -android:pathprefix="/conversation/" theAndroid:scheme="Rong"/> -</intent-filter> -</activity>
Show Avatar and name
Http://www.cnblogs.com/demon9/p/5852902.html
Listen for message reception set before calling the Connect method
Implement Rongimclient.onreceivemessagelistener
Public class Receivemessagelistener implements Rongimclient.onreceivemessagelistener { @Override publicint i) { LOGGER.E (i+"") +message.gettargetid () +" "+Message.getsenderuserid ()); return false ; }}
Set in Application
Rongim.init (this); Rongim.setonreceivemessagelistener (new Receivemessagelistener ());
The listener message must be called after the Connect connection is successfully made
Implement Rongim.onsendmessagelistener
Public classSendmessagelistener implements Rongim.onsendmessagelistener {@Override Publicmessage onsend (Message message) {LOGGER.E ("OnSend"+message.getcontent () +"ID"+message.getsenderuserid () +" "+Message.gettargetid ()); returnmessage; } @Override Publicboolean onsent (Message message, Rongim.sentmessageerrorcode sentmessageerrorcode) {return false; }}
Set when the session is opened
if NULL ) rongim.getinstance (). Setsendmessagelistener (new Sendmessagelistener ()); " with the "+username+ " chat "); Finish ();
Some of the issues that you encounter with the Cloud SDK