Code Monkey home page Code Monkey logo

Comments (44)

JiangJuHong avatar JiangJuHong commented on August 20, 2024

我未测试过打包,你得到的所有会话都有问题吗?或者只是其中某个

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

获取会话列表时,我的会话列表中只有一天对话。感觉这条会话实体是拿到了。我尝试输出它的id和type的。但是输出结果是null

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

建议你多创建几个会话,Group、C2C,这样有便于排查错误

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

终于测明白了
本次测试账号共四条会话 ,一个Group、三个C2C。
使用方法:

 TencentImPlugin.addListener((type,params){
   if (type == ListenerTypeEnum.RefreshConversation) {
         devbug和build 版本 均正确返回数组
        [ Instance of 'SessionEntity'  *  4]
   }
});
但是  build版本中的 [ Instance of 'SessionEntity'  *  4]  中 每个的属性都是nul

debug:log:

home页面listener被触发  --start---
I/flutter (15282): [Instance of 'SessionEntity', Instance of 'SessionEntity', Instance of 'SessionEntity', Instance of 'SessionEntity']
I/flutter (12706): 已添加会话id:15545111710,会话类型type:SessionType.C2C
I/flutter (12706): 已添加会话id:15545111711,会话类型type:SessionType.C2C
I/flutter (12706): 已添加会话id:18745043399,会话类型type:SessionType.C2C
I/flutter (12706): 已添加会话id:@TGS#2QVKBJHGN,会话类型type:SessionType.Group

build:log:

home页面listener被触发  --start---
I/flutter (15282): [Instance of 'SessionEntity', Instance of 'SessionEntity', Instance of 'SessionEntity', Instance of 'SessionEntity']
I/flutter (15282): 已添加会话id:null,会话类型type:null
I/flutter (15282): 已经存在,不添加该条会话id:null,会话类型type:null
I/flutter (15282): 已经存在,不添加该条会话id:null,会话类型type:null
I/flutter (15282): 已经存在,不添加该条会话id:null,会话类型type:null

`

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

我明白了,最近我会安排时间进行排查修复

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

你好作者,debug版本也拿不到列表了。刚刚拉了 github 上最新demo 也是拿不到了!

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

没有错误信息,就是没会话。还是这个方法
监听器只被触发了一次 ,是这个类型ListenerTypeEnum.Connected

 TencentImPlugin.addListener((type,params){
   if (type == ListenerTypeEnum.RefreshConversation) {

   }
});

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024
I/flutter (22408): IM初始化成功
I/flutter (22408): _listener监听器被触发  --start---
I/flutter (22408): 监听到未处理类型 ListenerTypeEnum.Connected
I/flutter (22408): 监听到未处理参数null
I/flutter (22408): _listener监听器被触发 --end---
I/flutter (22408): im登录成功

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

测试账号列表里一共有4条会话,上午的时候我就发现有问题。仅返回一条会话。后来下午一条会话都获取不到了

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

感谢作者。静候佳音

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

我在本地环境测试没有发现问题,你可以提供一下复现代码吗?

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

你使用的版本号是多少?

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

最新的 0.1.17.稍等 我在拉下demo试试

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

image
70003 在腾讯云对应的是校验失败,请检查你的 identifier 和 userSig

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

嗯嗯,刚才是我发错了。是我用过时的 userSig 在demo尝试登录。这会在您的demo上使用我们自己的im信息已经登录成功 。但是依然没有回话。我不知道是我们服务端的问题 还是什么问题。。但是我使用您的im信息是正常获取回话的

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

请确保 Console 是否有错误信息输出,或尝试使用 腾讯云 SDK 所提供的Demo查看会话

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

没有任何错误输出信息,我在具体确定一下问题吧,确定好后 回复您

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

我又新建了 几个会话,正常查出来了。。不知道之前的会话为什么没有了,可能是我们服务端那边调试了

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

好的,如果还有问题可以随时联系我

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

谢谢 老哥,另外 打包apk后 会话实体数据里面的 属性都是null 。这个本周会排查修复好吗。

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

如果不出意外,它将在本周被修复

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

好的 感谢。

from fluttertencentimplugin.

sunyaodong avatar sunyaodong commented on August 20, 2024

/Users/sunyd/Desktop/DevelopTool/flutter/.pub-cache/hosted/pub.flutter-io.cn/tencent_im_plugin-0.1.22/android/src/main/java/top/huic/tencent_im_plugin/TencentImPlugin.java:119: 错误: 无法访问LifecycleOwner
final MethodChannel channel = new MethodChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor(), "tencent_im_plugin");
^
找不到androidx.lifecycle.LifecycleOwner的类文件
注: /Users/sunyd/Desktop/DevelopTool/flutter/.pub-cache/hosted/pub.flutter-io.cn/tencent_im_plugin-0.1.22/android/src/main/java/top/huic/tencent_im_plugin/TencentImPlugin.java使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
1 个错误

大佬,我添加插件依赖后,运行,爆出这个错误。知道是什么原因吗?

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

你好,请问你是否执行了 Gradle Build。如果执行了,能否提供你的Flutter版本。且你有拉下Demo试运行吗? @sunyaodong

from fluttertencentimplugin.

sunyaodong avatar sunyaodong commented on August 20, 2024

Gradle Build执行了。
Flutter版本1.9.1+hotfix.6
我demo也报这个错误

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

你好,建议你先将Flutter升级为 stable 分支的最新版,然后再进行尝试。我在我的设备上没能复现这个问题。 @sunyaodong

from fluttertencentimplugin.

sunyaodong avatar sunyaodong commented on August 20, 2024

感谢大佬,我跑通了。问个问题identifier这个用户id去哪获取,还有userSig是密匙吗? @JiangJuHong

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

@sunyaodong 这个identifier你可以自定义为任何值,建议关联到自己业务系统的用户唯一ID中,userSig是根据ID生成的密钥,腾讯云userSig生成相关文档:https://cloud.tencent.com/document/product/269/32688

from fluttertencentimplugin.

JiangJuHong avatar JiangJuHong commented on August 20, 2024

这个问题已被修复,版本号为 0.2.0,问题原因是由于混淆配置不正确。 @yuefeng007
0.2.0 已发布,�地址:https://pub.dev/packages/tencent_im_plugin
由于版本改动较大,请根据 README.md 指引进行调整,感谢你的支持。

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

好的。我现在去升级它。感谢作者,

from fluttertencentimplugin.

chinafelix avatar chinafelix commented on August 20, 2024

[Instance of 'SessionEntity', Instance of 'SessionEntity', Instance of 'SessionEntity', Instance of 'SessionEntity']

我调用TencentImPlugin.getConversationList(),返回以上的数据,这种数据是正常的吗?如果是,该格式怎么解析成json呢?

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

['SessionEntity'的实例,'SessionEntity'的实例,'SessionEntity'的实例,'SessionEntity'的实例]

我调用TencentImPlugin.getConversationList(),返回以上的数据,这种数据是正常的吗?如果是,该格式怎么解析成json呢?

不要解析成json。SessionEntity 是dart对象 可以直接访问其属性即可

from fluttertencentimplugin.

chinafelix avatar chinafelix commented on August 20, 2024

@yuefeng007 你好,我对dart不太熟悉,方便说一下该怎么访问属性吗?
我参照session_entry.dart的结构,用以下方法获取faceUrl属性不行:
我用list[index]['faceUrl']访问不了;其中list是数组,list[index]是一个SessionEntity对象

from fluttertencentimplugin.

chinafelix avatar chinafelix commented on August 20, 2024

你好,已经读取到属性值了;谢谢;
我们每次读取一个 ObjectEntry,都要找到对应的ObjectEntry对象,才能知道它里面包含哪些属性吗?

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

list[index]['faceUrl'] 这种可以访问json数据 ,dart对象要这样 list[index].faceUrl

from fluttertencentimplugin.

chinafelix avatar chinafelix commented on August 20, 2024

谢谢,我用的AS编辑器,也可以的直接打开对应类的;

VSCode可以做到热更新吗?

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

from fluttertencentimplugin.

chinafelix avatar chinafelix commented on August 20, 2024

学到了,我本来也想用vscode。但是没找到热更新的方法,才换了AS;

from fluttertencentimplugin.

yuefeng007 avatar yuefeng007 commented on August 20, 2024

from fluttertencentimplugin.

chinafelix avatar chinafelix commented on August 20, 2024

这种只能正对Entry的对象吧;AS会有很多非属性的选项,所以不知道哪些是它的可访问属性,哪些不是

from fluttertencentimplugin.

chinafelix avatar chinafelix commented on August 20, 2024

等下也换成vscode试试,比较顺手点

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.