Code Monkey home page Code Monkey logo

Comments (23)

JiangJuHong avatar JiangJuHong commented on June 25, 2024

生产环境还是Debug环境

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on June 25, 2024

可以通过AS运行,然后在 CustomMessageEntity.java 147 行打一个Debug,我看看数据

from fluttertencentimplugin.

senmao1994 avatar senmao1994 commented on June 25, 2024

debug环境 稍等 我试试

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on June 25, 2024

自定义消息没有传递Data字段吗?

from fluttertencentimplugin.

senmao1994 avatar senmao1994 commented on June 25, 2024

会话监听我是在首页做的。这时候都没有调用自定义消息传递
WX20211122-105643@2x

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on June 25, 2024

此字段为必传的,如果不传递此字段,不仅android会出错,ios也会出错。故android没有进行非空判断:

this.data = new String(elem.getData());

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on June 25, 2024

和会话监听没关系,你自定义消息没数据,内部收到会话后会获取最后一条消息,进而进行解析自定义消息。

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on June 25, 2024

堆栈信息是由于你收到了新会话事件,然后解析最后一条消息时出错,请确保 CustomMessage 中的 data 属性不为空。

from fluttertencentimplugin.

senmao1994 avatar senmao1994 commented on June 25, 2024

可是我的监听中 还没有做相关处理 而且 我还没有做自定义消息发送 = =
image
这是需要在监听中我本身就需要对自定义消息先做判断吗

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on June 25, 2024

不需要,是你消息中本来就存在一条自定义消息(之前发送的或通过其他平台发送的)

from fluttertencentimplugin.

senmao1994 avatar senmao1994 commented on June 25, 2024

那我现在是需要在会话监听里面判断 还是在发送时就要判断

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on June 25, 2024

发送时,自定义消息的data属性不能为空,如果要删除本次会话,请删关闭监听器,然后手动调用删除会话接口,然后可以再打开监听器。

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on June 25, 2024

需要查看具体的消息内容,请使用 AS启动,在 CustomMessageNode 中的26行打一个debug

from fluttertencentimplugin.

senmao1994 avatar senmao1994 commented on June 25, 2024

刚询问了我的同事 因为 自定义消息是后台发送的 data字段 他没有用到 也就说可能真的会为空 --

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on June 25, 2024

更新最新Ref,内容作了兼容判断,�不过自定义消息的data依旧不建议传递空数据,如果此内容为空,那就代表此消息无效。

from fluttertencentimplugin.

senmao1994 avatar senmao1994 commented on June 25, 2024

好的 谢谢。因为我们这边 服务端同事用的字段是ext 没用data字段

from fluttertencentimplugin.

senmao1994 avatar senmao1994 commented on June 25, 2024

已经可以了 谢谢大佬~

from fluttertencentimplugin.

senmao1994 avatar senmao1994 commented on June 25, 2024

Unhandled Exception: LateInitializationError: Field 'data' has not been initialized.
使用自定义消息的时候 报错
因为data 传入的是空字符串
安卓端

from fluttertencentimplugin.

senmao1994 avatar senmao1994 commented on June 25, 2024

image
使用的最新的分支

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on June 25, 2024

好的,明天修复

from fluttertencentimplugin.

senmao1994 avatar senmao1994 commented on June 25, 2024

好的 谢谢大佬

from fluttertencentimplugin.

senmao1994 avatar senmao1994 commented on June 25, 2024

想问下我这边 自定义消息发送时 是成功的 但是监听收到时 data和ext 这两个字段都是null 数据是已经存进去了 但是就是监听返回时没有值

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on June 25, 2024

拉取最新ref即可

Unhandled Exception: LateInitializationError: Field 'data' has not been initialized. 使用自定义消息的时候 报错 因为data 传入的是空字符串 安卓端

拉取最新即可

from fluttertencentimplugin.

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.