Some of the issues that you encounter with the Cloud SDK

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.