Giter VIP home page Giter VIP logo

Comments (7)

hjiang avatar hjiang commented on July 21, 2024

麻烦 @lbt05 确认一下。

from docs.

cyhhao avatar cyhhao commented on July 21, 2024

@lbt05
还有

imClient.createConversation(clientIds, attr, new AVIMConversationCreatedCallback() {
  @Override
  public void done(AVIMConversation conversation, AVException e) {
    if (null != conversation) {
      // 成功了,这时候可以显示对话的 Activity 页面(假定为 ChatActivity)了。
      Intent intent = new Intent(this, ChatActivity.class);
      Intent.putExtra(“conversation”, conversation);
      startActivity(intent);
    }
  }
});

这一段中“conversation”的双引号是中文的,应该改为英文的,以及Intent.putExtra(...)中的 I 字母应该改为小写的 i 。

from docs.

myleslee avatar myleslee commented on July 21, 2024

@cyhhao 多谢!己改正。

from docs.

cyhhao avatar cyhhao commented on July 21, 2024

@myleslee 额,看我上一条回复的,还有一个小问题。
文档中后面还有一个问题:

// 自定义消息响应类
class CustomMessageHandler extends AVIMMessageHandler {
  @Override
  public void onMessage(AVIMMessage message, AVIMConversation conversation, AVIMClient client) {
    // 新消息到来了。在这里增加你自己的处理代码。
    String msgContent = message.getContent();
    Logger.d(conversation.getConversationid() + " 收到一条新消息:" + msgContent);
  }
}

这里的getConversationid应该是getConversationId i 应该是大写的。
@hjiang
ps: 建议你们的文档直接用demo里代码直接复制粘贴过来,或者提前用IDE检查一下大小写、拼写和引号。

from docs.

myleslee avatar myleslee commented on July 21, 2024

@lbt05 还有一处要改:这里的getConversationid应该是getConversationId i 应该是大写的。

from docs.

cyhhao avatar cyhhao commented on July 21, 2024

@lbt05
实时通信Android SDK文档中,获取离线消息部分:

// 查询当前对话的最新消息,默认返回 100 条
void queryMessages(final AVIMHistoryMessageCallback callback);

// 查询当前对话的最新消息,返回 limit 指定的条数
void queryMessages(int limit, final AVIMHistoryMessageCallback callback);

// 前向查询当前对话的历史消息,msgId/timestamp 指定消息的起点,limit 指定需要的结果条数
void queryMessages(String msgId, long timestamp, int limit, final AVIMHistoryMessageCallback callback);

AVIMHistoryMessageCallback 类好像已经被弃用了,此处应该改为 AVIMMessagesQueryCallback

ps: 因为用到这里了,所以看到有些问题,不知道文档中其他部分是不是也有陈旧的需要更新的地方,建议你们有空可以把每个代码块检查一下,更新一下。

from docs.

myleslee avatar myleslee commented on July 21, 2024

@cyhhao 已在 PR #322 中修正。多谢!

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.