感谢您访问我的主页,不妨给个关注。
欢迎光临我的点卡小铺:点卡系统,如果需要更多内容,欢迎与我联系
基于ChatGPT的一款效率助手,支持公众号、网页版以及浏览器插件,https://www.ai-text.top
腾讯即时通讯(IM),Flutter插件
License: Apache License 2.0
感谢您访问我的主页,不妨给个关注。
欢迎光临我的点卡小铺:点卡系统,如果需要更多内容,欢迎与我联系
基于ChatGPT的一款效率助手,支持公众号、网页版以及浏览器插件,https://www.ai-text.top
现在需求:发送消息后立刻把消息显示在ui,消息状态是发送中,等消息发送成功后,再更新ui。
但是,现在没有办法标记消息,怎么才能在消息发送成功回调时,找到对应的,ui上的消息,更新消息状态。
這個initStorage用途是? 另外identifier 是否要跟login 的一樣?
await TencentImPlugin.initStorage(identifier: "dev");
await TencentImPlugin.login(
identifier: "dev",
......
);
我hot reload 時就卡在這句上
1、消息监听器,会重复回调。比如:type为ListenerTypeEnum.RefreshConversation收到一条消息,会回调两次。type为ListenerTypeEnum.NewMessages时则是根据点了多少次Run按钮来的(Android Studio上那个绿色三角形)。比如点了5次,收到新消息就有5次回调。
2、TencentImPlugin.initStorage()。第一次无法初始化
希望大佬能够看一下,谢谢了
ios端,在启动app后,切换后台运行之后,再切换到前台,app会直接崩溃。
这个是崩溃的日志
0 Runner 0x0000000102ae1664 specialized SwiftTencentImPlugin.onConnFailed(:err:) + 276
1 Runner 0x0000000102ac2df8 @objc SwiftTencentImPlugin.onConnFailed(:err:) + 96
FlutterTencentImPlugin-master/ios/Classes/SwiftTencentImPlugin.swift:1712:67: error: use of unresolved identifier 'GroupTipsMessageEntity'
self.invokeListener(type: ListenerType.GroupTips, params: GroupTipsMessageEntity(elem: elem));
TXIMSDK_iOS版本:4.7.2
app 构建版本上传至app store 时 苹果提示相关推送权限的问题
我想可能是im插件的关系,如果我不打算使用推送,是否可以通过一些简单的修改后 正常上传至 app atore呢
ITMS-90078: Missing Push Notification Entitlement - Your app appears to register with the Apple Push Notification service, but the app signature's entitlements do not include the 'aps-environment' entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the 'aps-environment' entitlement. Xcode does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor's Capabilities pane, or manually add the entitlement to your entitlements file. For more information, see https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1.
請問如何能幫上忙?
IPHONE環境
if (type == ListenerTypeEnum.NewMessages) {
//看語法理論上SetState 是可以,但是沒法更新,所以我加了這個強逼REFRESH,就顯示到新對話訊息,也能顯示出來,請問有沒有更好的方法?
onRefresh();
// 更新消息列表
this.setState(()
{
data.add(DataEntity(data: params));
// this.updateData(DataEntity(data: params));
//data.add(DataEntity(data: params));
});
// 设置已读
TencentImPlugin.setRead(sessionId: widget.id, sessionType: widget.type);
}
但是 ListenerTypeEnum.RefreshConversation 是正常被触发的
版本 tencent_im_plugin: ^0.2.19
现在调试过程里没有打印日志
是否能加上日志控制
日志事件
IM SDK 内部会进行打印日志,如果调用方有自己统一的日志收集方式,可以通过 TIMSdkConfig 中的 setLogListener 接口设置日志事件回调,把日志通过回调返给调用方,但 IM SDK 内部仍然会打印,如果需要禁掉,可以通过设置控制台不打印日志,或者设置日志级别。
文本/图片消息 已测试 无问题
语音消息无法送达,
视频和位置还没有测试
以下是ios 的log日志
flutter: 准备调用 TencentImPlugin.sendMessage ========start=======
flutter: 发送参数为
flutter: sessionId:15545111711
flutter: sessionType:SessionType.C2C
flutter: duration:8
flutter: path:file:///Users/a/Library/Developer/CoreSimulator/Devices/CF137EF9-71A6-434E-AE4E-B096ECDB43D2/data/Containers/Data/Application/8AB655E7-5208-4E71-9034-AB650DA511C2/Library/Caches/4ihvkfhpdomzxikcqtf_sound_.aac
flutter: 开始调用 TencentImPlugin.sendMessage ========ing=======
flutter: 调用结束 TencentImPlugin.sendMessage ========end=======
[C5.1.1 4896F020-C1F2-48B3-9761-DE60AA80F7C0 192.168.1.123:49971<->111.161.64.123:443]
Connected Path: satisfied (Path is satisfied), interface: en1
Duration: 0.479s, DNS @0.005s took 0.004s, TCP @0.010s took 0.145s, TLS took 0.244s
bytes in/out: 5031/1337, packets in/out: 6/4, rtt: 0.129s, retransmitted packets: 0, out-of-order packets: 0
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: PlatformException(7006, Execution Error, File check failed)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
<asynchronous suspension>
#2 TencentImPlugin.sendMessage (package:tencent_im_plugin/tencent_im_plugin.dart:73:24)
#3 _ChatBarState._getWindow.<anonymous closure> (package:chatpear/modules/home/widet_chat/chat_bar.dart:168:29)
#4 _WindowVoiceState.stopRecorder (package:chatpear/modules/home/widet_chat/window_voice.dart:192:16)
<asynchronous suspension>
#5 _WindowVoiceState.build.<anonymous closure> (package:chatpear/modules/home/widet_chat/window_voice.dart:85:9)
#6 DragGestureRecognizer._checkEnd.<anonymous closure> (package:flutter/src/gestures/monodrag.dart:439:41)
#7 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#8 Dra<…>
[C6.1.1 1BA48832-8376-4B7E-99C8-50AA0DBD750E 192.168.1.123:49973<->111.161.64.123:443]
Connected Path: satisfied (Path is satisfied), interface: en1
Duration: 0.303s, DNS @0.005s took 0.004s, TCP @0.010s took 0.048s, TLS took 0.137s
bytes in/out: 3795/1165, packets in/out: 5/4, rtt: 0.050s, retransmitted packets: 0, out-of-order packets: 0
报错:
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(6206, Execution Error, userSig expired)
在 TIM 后台验证 userSig 是正确的:
class TIM{
init()async{
await TencentImPlugin.init(appid: "14003450xx");
}
initStorage(String useridIm)async{
await TencentImPlugin.initStorage(identifier: useridIm);
}
getUserSig(String useridIm)async{
Map data = {
"id_im": useridIm
};
Map res =await Request().post(data, '/account/tls_sig/');
if(res["statusCode"]==200){
return res["data"];
}
}
login(String useridIm, String userSig)async{
TencentImPlugin.login(identifier: useridIm, userSig: userSig);
}
logout() {
TencentImPlugin.logout();
}
}
startTIM()async{
userAccountModel = Provider.of<UserAccountModel>(context);
String useridIm = generateImUserId(userAccountModel.useraccount);
await TIM().init();
await TIM().initStorage(useridIm);
String userSig = await TIM().getUserSig(useridIm);
log("#### tim user id $useridIm ####");
log("#### tim user sig is $userSig ####");
TIM().login(useridIm, userSig);
}
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, v1.12.13+hotfix.5, on Mac OS X 10.14.6 18G87, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.43.2)
[✓] Connected device (2 available)
• No issues found!
GroupPendencyEntity这个模型中,swift:handlerStatus,flutter:handledStatus造成getGroupPendencyList此方法返回的数据中handledStatus为null,麻烦作者改一下,谢谢!
sessionId
or sessionId
is null!, 5)sessionId
or sessionId
is null!, 5)初始化时已经
初始化了 TencentImPlugin.initStorage(identifier: useridIm);
但是下面两个接口在没有网络时,不能取到数据:
TencentImPlugin.getConversationList();
TencentImPlugin.getLocalMessages
getLocalMessage | 从本地数据库中获取历史消息。
这个接口是否是在没有网络时,也能返回本地保存的数据呢?
另外再打听一下离线推送的进度~.~
什么时候能到正式版?
騰訊雲裡OFFLINE PUSH設定時,要SKDAPPID,這個在那裡找
你好,我是iOS小白,想请教下各位大佬这个问题怎么处理
dispose时有移除监听,但下次进来还是会多次触发
只是发送我本地图片的地址吗?那别人怎么显示这张图片?
能封装相关方法吗,我看iOS与安卓的字段好像并不一样。
如题!!!
E/flutter ( 6252): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, java.lang.Long cannot be cast to java.lang.Integer, null)
设置了userSig过期时间是一周,但每次重新运行app,调会话接口时都获取不到userProfile,请问这是离线了吗?
I/imsdk (27177): TIM: ====== TIM
I/imsdk (27177): TIM: ====== Ver: 4.6.1
I/imsdk (27177): TIM: ====== Compile: Nov 13 2019 20:19:09
I/imsdk (27177): TIM: ====== Platform: Android
I/imsdk (27177): TIM: ====== PID: 27177
I/imsdk (27177): TIM: ==========================================================================
D/imsdk (27177): TIM: 2020-06-23 22:17:19.138/D/27177-27448 /Network -looper_impl.cpp.195 operator() /looper start work|name:looper_logic
D/imsdk (27177): TIM: 2020-06-23 22:17:19.145/D/27177-27449 /Network -looper_impl.cpp.195 operator() /looper start work|name:looper_db
I/imsdk (27177): TIM: 2020-06-23 22:17:19.145/I/27177-27177 /Network -imsession_sso_session.cpp.409 Init /session init, sdkAppId: 1400379445, system version: 10, app version: 4.6.1
I/imsdk (27177): TIM: 2020-06-23 22:17:19.145/I/27177-27177 /Common -imcore_manager.cpp.147 InitSdk /InitSdk, device type: CLT-L29, system version: 10, app version = 4.6.1
I/imsdk (27177): TIM: 2020-06-23 22:17:19.145/I/27177-27448 /Network -imsession_session_config.cpp.486 operator() /read config file /data/user/0/com.example.test/files/imsdk_config
W/imsdk (27177): TIM: 2020-06-23 22:17:19.145/W/27177-27448 /Network -imsession_session_config.cpp.488 operator() /cannot create config read stream
I/imsdk (27177): TIM: 2020-06-23 22:17:19.154/I/27177-27177 /Msg -elem_processor.cpp.28 RegisterElemHandler /Register Elem Handler
I/imsdk (27177): TIM: 2020-06-23 22:17:19.154/I/27177-27177 /Msg -elem_processor.cpp.28 RegisterElemHandler /Register Elem Handler
I/imsdk (27177): TIM: 2020-06-23 22:17:19.154/I/27177-27177 /Msg -elem_processor.cpp.28 RegisterElemHandler /Register Elem Handler
I/imsdk (27177): TIM: 2020-06-23 22:17:19.155/I/27177-27177 /Msg -elem_processor.cpp.28 RegisterElemHandler /Register Elem Handler
I/chatty (27177): uid=10286(com.example.test) looper_log identical 1 line
I/imsdk (27177): TIM: 2020-06-23 22:17:19.155/I/27177-27177 /Msg -elem_processor.cpp.28 RegisterElemHandler /Register Elem Handler
I/imsdk (27177): TIM: 2020-06-23 22:17:19.156/I/27177-27177 /Msg -elem_processor.cpp.28 RegisterElemHandler /Register Elem Handler
I/imsdk (27177): TIM: 2020-06-23 22:17:19.156/I/27177-27177 /Msg -elem_processor.cpp.28 RegisterElemHandler /Register Elem Handler
I/imsdk (27177): TIM: 2020-06-23 22:17:19.158/I/27177-27448 /Network -imsession_sso_session.cpp.925 MakesureConnect /wait_connect_task_id_:0|interval: 0|netId:1:
I/imsdk (27177): TIM: 2020-06-23 22:17:19.159/I/27177-27177 /Msg -elem_processor.cpp.28 RegisterElemHandler /Register Elem Handler
I/imsdk (27177): TIM: 2020-06-23 22:17:19.159/I/27177-27177 /Msg -elem_processor.cpp.28 RegisterElemHandler /Register Elem Handler
I/imsdk (27177): TIM: 2020-06-23 22:17:19.159/I/27177-27177 /IMSDK -BaseManager.0 /loadFriendshipModule init statt
I/imsdk (27177): TIM: 2020-06-23 22:17:19.162/I/27177-27177 /FriendShip-friendship_listener_jni.cpp.185 InitIDs /---- Start FriendshipListenerJni InitIDs
I/imsdk (27177): TIM: 2020-06-23 22:17:19.162/I/27177-27177 /FriendShip-friendship_listener_jni.cpp.212 InitIDs /---- End FriendshipListenerJni InitIDs
I/imsdk (27177): TIM: 2020-06-23 22:17:19.163/I/27177-27177 /FriendShip-friendship_jni.cpp.22 Java_com_tencent_imsdk_friendship_FriendshipNativeManager_nativeInitFriendshipModule/start init native Friendship Module
I/imsdk (27177): TIM: 2020-06-23 22:17:19.163/I/27177-27177 /Msg -elem_processor.cpp.28 RegisterElemHandler /Register Elem Handler
I/imsdk (27177): TIM: 2020-06-23 22:17:19.163/I/27177-27177 /Msg -elem_processor.cpp.28 RegisterElemHandler /Register Elem Handler
I/imsdk (27177): TIM: 2020-06-23 22:17:19.164/I/27177-27177 /FriendShip-friendship_jni.cpp.34 Java_com_tencent_imsdk_friendship_FriendshipNativeManager_nativeInitFriendshipModule/end init native Friendship Module
I/imsdk (27177): TIM: 2020-06-23 22:17:19.165/I/27177-27177 /IMSDK -TIMManager.0 /setUserConfig: userConfig=com.tencent.imsdk.TIMUserConfig@2179e90
I/imsdk (27177): TIM: 2020-06-23 22:17:19.165/I/27177-27177 /IMSDK -imsdk.ConversationManager.0 /addMessageListener: top.huic.tencent_im_plugin.listener.TencentImListener@9be9389
I/imsdk (27177): TIM: 2020-06-23 22:17:19.166/I/27177-27177 /IMSDK -NetConnectInfoCenter.0 /network changed, action: android.net.conn.CONNECTIVITY_CHANGE
I/imsdk (27177): TIM: 2020-06-23 22:17:19.167/I/27177-27177 /IMSDK -NetConnectInfoCenter.0 /wifi network connected
I/imsdk (27177): TIM: 2020-06-23 22:17:19.167/I/27177-27177 /IMSDK -NetConnectInfoCenter.0 /current network: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false]
I/imsdk (27177): TIM: 2020-06-23 22:17:19.167/I/27177-27177 /Common -manager_jni.cpp.273 Java_com_tencent_imsdk_manager_NativeManager_nativeOnNetworkChanged/OnNetworkChanged is connected 1
I/imsdk (27177): TIM: 2020-06-23 22:17:19.169/I/27177-27177 /IMSDK -NetConnectInfoCenter.0 /network changed, action: android.net.wifi.STATE_CHANGE
I/imsdk (27177): TIM: 2020-06-23 22:17:19.169/I/27177-27177 /IMSDK -NetConnectInfoCenter.0 /network changed, action: android.net.wifi.WIFI_STATE_CHANGED
I/imsdk (27177): TIM: 2020-06-23 22:17:19.170/I/27177-27448 /Network -imsession_monitor.cpp.136 OnConnecting /previous record|content:date_time=1592921735&sdk_app_id=1400379445&conn_succ=1&conn_time=57&conn_last=207404&sdk_client_ip=&sso_ip=203.205.254.165&sso_port=8080&conn_reason=4&send_count=0&send_succ_count=0&send_high_count=0&send_high_succ_count=0&avg_rtt=0&net_type=wifi&state=1×tamp=2020-06-23T22:15:35.340+0800&sso_ip_src=4&sso_ip_list=203.205.254.165:8080,203.205.253.149:8080&failed_ip_list=&error_code=0®_error_code=0&error_msg=
I/imsdk (27177): TIM: 2020-06-23 22:17:19.170/I/27177-27448 /Network -imsession_sso_session.cpp.962 NotifyNetState /notify network change|status:0
I/imsdk (27177): TIM: 2020-06-23 22:17:19.170/I/27177-27448 /IMSDK -NativeManager.0 /onNetworkStatusChanged Enter; type:2 code:0 errMsg:
I/imsdk (27177): TIM: 2020-06-23 22:17:19.170/I/27177-27448 /IMSDK -BaseManager.0 /onConnecting
I/imsdk (27177): TIM: 2020-06-23 22:17:19.170/I/27177-27448 /Network -imsession_sso_session.cpp.1493 DisableCheckNetwork /check network stop
I/imsdk (27177): TIM: 2020-06-23 22:17:19.170/I/27177-27448 /Network -imsession_session_config.cpp.123 GetSsoList /netId:1:
I/imsdk (27177): TIM: 2020-06-23 22:17:19.176/I/27177-27448 /Network -imsession_sso_session.cpp.783 operator() /OnDeviceNetworkChange|state:1
I/imsdk (27177): TIM: 2020-06-23 22:17:19.176/I/27177-27448 /IMSDK -NativeManager.0 /onNetworkStatusChanged Enter; type:2 code:0 errMsg:
I/imsdk (27177): TIM: 2020-06-23 22:17:19.176/I/27177-27448 /IMSDK -BaseManager.0 /onConnecting
D/NetworkSecurityConfig(27177): No Network Security Config specified, using platform default
I/imsdk (27177): TIM: 2020-06-23 22:17:19.226/I/27177-27448 /Network -imsession_session_config.cpp.166 operator() /response:203.205.253.149;203.205.254.165|costTime:56
I/imsdk (27177): TIM: 2020-06-23 22:17:19.226/I/27177-27448 /Network -imsession_sso_session.cpp.869 operator() /netType:1|netId:1:|ip count: 2|race:true|ssoListip_src:4
I/imsdk (27177): TIM: 2020-06-23 22:17:19.226/I/27177-27448 /Network -imsession_sso_session.cpp.874 operator() /Ip list|ip:203.205.253.149|port:8080|weight:0
I/imsdk (27177): TIM: 2020-06-23 22:17:19.226/I/27177-27448 /Network -imsession_sso_session.cpp.874 operator() /Ip list|ip:203.205.254.165|port:8080|weight:0
I/imsdk (27177): TIM: 2020-06-23 22:17:19.226/I/27177-27448 /Network -imsession_sso_session.cpp.893 operator() /Connect begin, ip: 203.205.253.149, port: 8080
I/imsdk (27177): TIM: 2020-06-23 22:17:19.227/I/27177-27448 /Network -channel.cpp.332 SetError /channel error|id=0|error=0,
I/imsdk (27177): TIM: 2020-06-23 22:17:19.228/I/27177-27448 /Network -imsession_sso_session.cpp.81 operator() /connect channelId: 0, status: 0, ec: 0,
I/imsdk (27177): TIM: 2020-06-23 22:17:19.228/I/27177-27448 /Network -imsession_sso_session.cpp.96 operator() /Connecting, ip: 203.205.253.149, port: 8080, channel id: 0
I/imsdk (27177): TIM: 2020-06-23 22:17:19.229/I/27177-27448 /Network -imsession_sso_session.cpp.893 operator() /Connect begin, ip: 203.205.254.165, port: 8080
I/imsdk (27177): TIM: 2020-06-23 22:17:19.229/I/27177-27448 /Network -channel.cpp.332 SetError /channel error|id=1|error=0,
I/imsdk (27177): TIM: 2020-06-23 22:17:19.229/I/27177-27448 /Network -imsession_sso_session.cpp.81 operator() /connect channelId: 1, status: 0, ec: 0,
I/imsdk (27177): TIM: 2020-06-23 22:17:19.229/I/27177-27448 /Network -imsession_sso_session.cpp.96 operator() /Connecting, ip: 203.205.254.165, port: 8080, channel id: 1
I/imsdk (27177): TIM: 2020-06-23 22:17:19.238/I/27177-27448 /Network -imsession_sso_session.cpp.81 operator() /connect channelId: 0, status: 1, ec: 0,
I/imsdk (27177): TIM: 2020-06-23 22:17:19.239/I/27177-27448 /Network -imsession_monitor.cpp.284 Record /record|content:date_time=1592921839&sdk_app_id=1400379445&conn_succ=1&conn_time=70&conn_last=0&sdk_client_ip=&sso_ip=203.205.253.149&sso_port=8080&conn_reason=0&send_count=0&send_succ_count=0&send_high_count=0&send_high_succ_count=0&avg_rtt=0&net_type=wifi&state=1×tamp=2020-06-23T22:17:19.239+0800&sso_ip_src=4&sso_ip_list=203.205.253.149:8080,203.205.254.165:8080&failed_ip_list=&error_code=0®_error_code=0&error_msg=
I/imsdk (27177): TIM: 2020-06-23 22:17:19.239/I/27177-27448 /Network -imsession_sso_session.cpp.128 operator() /Connected succeed, ip: 203.205.253.149, port: 8080, channel id: 0, failed ip list:
I/imsdk (27177): TIM: 2020-06-23 22:17:19.239/I/27177-27448 /Network -imsession_sso_session.cpp.962 NotifyNetState /notify network change|status:1
I/imsdk (27177): TIM: 2020-06-23 22:17:19.239/I/27177-27448 /IMSDK -NativeManager.0 /onNetworkStatusChanged Enter; type:1 code:0 errMsg:
I/imsdk (27177): TIM: 2020-06-23 22:17:19.239/I/27177-27448 /IMSDK -BaseManager.0 /onConnected
I/imsdk (27177): TIM: 2020-06-23 22:17:19.240/I/27177-27448 /Network -imsession_sso_session.cpp.930 SendRemain /send remain|size: 0
I/imsdk (27177): TIM: 2020-06-23 22:17:19.240/I/27177-27448 /Network -imsession_sso_session.cpp.952 SendRemain /send cache|size: 0
I/imsdk (27177): TIM: 2020-06-23 22:17:19.240/I/27177-27448 /Network -imsession_sso_session.cpp.1493 DisableCheckNetwork /check network stop
I/imsdk (27177): TIM: 2020-06-23 22:17:19.250/I/27177-27448 /Network -imsession_sso_session.cpp.1458 EnableCheckNetwork /check network start, current netId: 1:
I/imsdk (27177): TIM: 2020-06-23 22:17:19.250/I/27177-27448 /Network -imsession_sso_session.cpp.81 operator() /connect channelId: 1, status: 1, ec: 0,
I/imsdk (27177): TIM: 2020-06-23 22:17:19.250/I/27177-27448 /Network -imsession_sso_session.cpp.110 operator() /Connected later, ip: 203.205.254.165, port: 8080, channel id: 1
I/imsdk (27177): TIM: 2020-06-23 22:17:19.250/I/27177-27448 /Network -channel.cpp.293 Close /channel closing
I/imsdk (27177): TIM: 2020-06-23 22:17:19.250/I/27177-27448 /Network -imsession_sso_session.cpp.81 operator() /connect channelId: 1, status: 2, ec: 0,
I/imsdk (27177): TIM: 2020-06-23 22:17:19.250/I/27177-27448 /Network -channel.cpp.172 OnChannelRecycle /channel recycle|id:1|count:0
I/imsdk (27177): TIM: 2020-06-23 22:17:19.628/I/27177-27446 /IMSDK -SessionWrapper.0 /try to bind service,
请问 TIMGroupSystemElem 有实现的计划吗 就差这一个点了
首先感谢作者封装插件供开发者使用!
在实际接入中遇到一些实际问题
如题,log日志如下
bogon:demo a$ flutter run
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install... 0.8s
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Finding Podfile changes
A tencent_im_plugin
- Flutter
- amap_core_fluttify
- amap_location_fluttify
- city_pickers
- flutter_plugin_android_lifecycle
- flutter_sound
- flutter_splash_screen
- fluttertoast
- foundation_fluttify
- image_crop
- image_picker
- path_provider
- path_provider_macos
- permission_handler
- shared_preferences
- shared_preferences_macos
- shared_preferences_web
- webview_flutter
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `amap_core_fluttify` from
`.symlinks/plugins/amap_core_fluttify/ios`
-> Fetching podspec for `amap_location_fluttify` from
`.symlinks/plugins/amap_location_fluttify/ios`
-> Fetching podspec for `city_pickers` from
`.symlinks/plugins/city_pickers/ios`
-> Fetching podspec for `flutter_plugin_android_lifecycle` from
`.symlinks/plugins/flutter_plugin_android_lifecycle/ios`
-> Fetching podspec for `flutter_sound` from
`.symlinks/plugins/flutter_sound/ios`
-> Fetching podspec for `flutter_splash_screen` from
`.symlinks/plugins/flutter_splash_screen/ios`
-> Fetching podspec for `fluttertoast` from
`.symlinks/plugins/fluttertoast/ios`
-> Fetching podspec for `foundation_fluttify` from
`.symlinks/plugins/foundation_fluttify/ios`
-> Fetching podspec for `image_crop` from `.symlinks/plugins/image_crop/ios`
-> Fetching podspec for `image_picker` from
`.symlinks/plugins/image_picker/ios`
-> Fetching podspec for `path_provider` from
`.symlinks/plugins/path_provider/ios`
-> Fetching podspec for `path_provider_macos` from
`.symlinks/plugins/path_provider_macos/ios`
-> Fetching podspec for `permission_handler` from
`.symlinks/plugins/permission_handler/ios`
-> Fetching podspec for `shared_preferences` from
`.symlinks/plugins/shared_preferences/ios`
-> Fetching podspec for `shared_preferences_macos` from
`.symlinks/plugins/shared_preferences_macos/ios`
-> Fetching podspec for `shared_preferences_web` from
`.symlinks/plugins/shared_preferences_web/ios`
-> Fetching podspec for `tencent_im_plugin` from
`.symlinks/plugins/tencent_im_plugin/ios`
-> Fetching podspec for `webview_flutter` from
`.symlinks/plugins/webview_flutter/ios`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local
because checking is only perfomed in repo update
CDN: trunk Relative path: all_pods_versions_8_f_f.txt exists! Returning
local because checking is only perfomed in repo update
CDN: trunk Relative path:
Specs/8/f/f/AMapFoundation/1.6.2/AMapFoundation.podspec.json exists!
Returning local because checking is only perfomed in repo update
CDN: trunk Relative path: all_pods_versions_0_3_9.txt exists! Returning
local because checking is only perfomed in repo update
CDN: trunk Relative path:
Specs/0/3/9/AMapLocation/2.6.4/AMapLocation.podspec.json exists! Returning
local because checking is only perfomed in repo update
CDN: trunk Relative path: all_pods_versions_6_1_0.txt exists! Returning
local because checking is only perfomed in repo update
CDN: trunk Relative path:
Specs/6/1/0/TXIMSDK_iOS/4.6.102/TXIMSDK_iOS.podspec.json exists! Returning
local because checking is only perfomed in repo update
CDN: trunk Relative path: all_pods_versions_8_d_3.txt exists! Returning
local because checking is only perfomed in repo update
[!] Unable to find a specification for `HandyJSON` depended upon by
`tencent_im_plugin`
You have either:
* out-of-date source repos which you can update with `pod repo update` or
with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:389:
in `find_cached_set'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:360:
in `specifications_for_dependency'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:165:
in `search_for'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:274:
in `block in sort_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:
in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:
in `sort_by'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:
in `sort_dependencies'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specif
ication_provider.rb:53:in `block in sort_dependencies'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specif
ication_provider.rb:70:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specif
ication_provider.rb:52:in `sort_dependencies'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:75
4:in `push_state_for_requirements'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:74
6:in `require_nested_dependencies_for'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:72
9:in `activate_new_spec'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:68
6:in `attempt_to_activate'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:25
4:in `process_topmost_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:18
2:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:i
n `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:94:i
n `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyz
er.rb:1065:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.r
b:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyz
er.rb:1063:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyz
er.rb:124:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:410
:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:235
:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.r
b:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:234
:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:156
:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/command/install.
rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:334:in
`run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in
`run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top
(required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'
Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
pod repo update
Error running pod install
Error launching application on iPhone 11 Pro Max.
当我收到视频消息时,我尝试输出《NodeVideoEntity》里面的属性如下:
我注意到缩略图 和视频路径 都是一样的。这块我应该如何使用呢
I/flutter (30266): =============snapshot(缩略图)=================
I/flutter (30266): ***snapshotPath***
I/flutter (30266): /storage/emulated/0/Android/data/****包名不可见***/files/Pictures
I/flutter (30266): ***snapshotInfo.size***
I/flutter (30266): 0
I/flutter (30266): ***snapshotInfo.width***
I/flutter (30266): 640
I/flutter (30266): ***snapshotInfo.height***
I/flutter (30266): 360
I/flutter (30266): =============snapshot(视频)=================
I/flutter (30266): ***videoPath***
I/flutter (30266): /storage/emulated/0/Android/data/****包名不可见***/files/Pictures
I/flutter (30266): ***videoInfo.duaration***
I/flutter (30266): 10
I/flutter (30266): ***videoInfo.size***
I/flutter (30266): 0
I/flutter (30266): ***videoInfo.type***
I/flutter (30266): mp4
I/flutter (30266): ***videoInfo.uuid***
I/flutter (30266):
I/flutter (30266): ***taskId***
I/flutter (30266): 0
我们主要功能已经集成完了
现在就差离线推送了,请问您这边有预计的时间吗
非常感谢
防止dart端没有接收原生返回导致一直挂起。
比如logout方法:
`
C:\Users\Administrator\Desktop\FlutterTencentImPlugin-master\android\src\main\java\top\huic\tencent_im_plugin\listener\TencentImListener.java:69: ����: �Ҳ�������
resultParams.put("params", params == null ? null : JsonUtil.toJSONString(params));
^
����: ��� JsonUtil
�: �� TencentImListener
C:\Users\Administrator\Desktop\FlutterTencentImPlugin-master\android\src\main\java\top\huic\tencent_im_plugin\listener\TencentImListener.java:70: ����: �Ҳ�������
channel.invokeMethod(LISTENER_FUNC_NAME, JsonUtil.toJSONString(resultParams));
^
����: ��� JsonUtil
�: �� TencentImListener
C:\Users\Administrator\Desktop\FlutterTencentImPlugin-master\android\src\main\java\top\huic\tencent_im_plugin\ValueCallBack.java:31: ����: �Ҳ�������
result.success(JsonUtil.toJSONString(t));
^
����: ��� JsonUtil
�: �� ValueCallBack
����, T�����ͱ��:
T�չ������ ValueCallBack��������Object
ע: C:\Users\Administrator\Desktop\FlutterTencentImPlugin-master\android\src\main\java\top\huic\tencent_im_plugin\TencentImPlugin.javaʹ�û����ѹ�ʱ�� API��
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣
ע: C:\Users\Administrator\Desktop\FlutterTencentImPlugin-master\android\src\main\java\top\huic\tencent_im_plugin\TencentImPlugin.javaʹ����δ������ȫ�IJ�����
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:unchecked ���±��롣
3 ������
FAILURE: Build failed with an exception.
Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
`
flutter_video_compress,這個經常出錯
flutter/flutter#37447
ios/Pods/Regift/Regift/Regift.swift:303:46: error: missing argument label 'preferredTimescale:' in call
1:若訊息量大,不能去到底部(最新訊息)
2. 新訊息沒有更新,
LISTENER收到NEW MESSAGE,但是在
this.setState(() {
data.add(params)
});
這裡死了
你好作者,我的项目升级至0.2.x版本以后
dio的post请求 ,response 200状态的就会导致app闪退。但非200的和get 的response不受影响。
我回顾代码版本 升级0.2.x时,发现确实没有改变任何其他代码。仅仅是把im迁移至0.2.x。
也再次确认过,迁移到0.2.x之前 确实没有此问题
有没有可能是插件影响的呢?
急,发布到线上环境出现崩溃
崩溃日志:
Incident Identifier: 0F58AB1A-4B4B-470A-8946-0FF5A3A95D32
Beta Identifier: 10D9E1C0-7E9E-48D2-8A6E-382B263A6EA5
Hardware Model: iPhone11,2
Process: Runner [341]
Path: /private/var/containers/Bundle/Application/1D04A132-BE41-4875-ADC3-346D1BF5973D/Runner.app/Runner
Identifier: com.fixtime.yuyu
Version: 72 (1.1.6)
AppStoreTools: 11E146
AppVariant: 1:iPhone11,2:13
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.fixtime.yuyu [479]
Date/Time: 2020-04-14 21:47:55.3593 +0800
Launch Time: 2020-04-14 21:36:10.1589 +0800
OS Version: iPhone OS 13.3.1 (17D50)
Release Type: User
Baseband Version: 2.04.03
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001029e666c
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [341]
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 tencent_im_plugin 0x00000001029e666c specialized SwiftTencentImPlugin.onConnFailed(:err:) + 472
1 tencent_im_plugin 0x00000001029e6530 specialized SwiftTencentImPlugin.onConnFailed(:err:) + 156
2 tencent_im_plugin 0x00000001029c3978 @objc SwiftTencentImPlugin.onConnFailed(_:err:) + 96
3 libdispatch.dylib 0x000000019253cb7c _dispatch_call_block_and_release + 32 (init.c:1408)
4 libdispatch.dylib 0x000000019253dfd8 _dispatch_client_callout + 20 (object.m:495)
5 libdispatch.dylib 0x0000000192549cc8 _dispatch_main_queue_callback_4CF + 968 (inline_internal.h:2484)
6 CoreFoundation 0x0000000192813cc8 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 (CFRunLoop.c:1749)
7 CoreFoundation 0x000000019280ea24 __CFRunLoopRun + 1980 (CFRunLoop.c:3069)
8 CoreFoundation 0x000000019280df40 CFRunLoopRunSpecific + 480 (CFRunLoop.c:3192)
9 GraphicsServices 0x000000019ca9e534 GSEventRunModal + 108 (GSEvent.c:2246)
10 UIKitCore 0x0000000196999580 UIApplicationMain + 1940 (UIApplication.m:4773)
11 Runner 0x0000000100efecf4 main + 96 (AppDelegate.swift:5)
12 libdyld.dylib 0x000000019268ce18 start + 4
dart端
/// 修改群成员资料
static Future<void> modifyMemberInfo({
@required String name, // 群名称
@required String identifier, // 成员ID
String nameCard, // 成员名片
int silence, // 禁言时间
int role, // 角色
ReceiveMessageOptEnum receiveMessageOpt, // 接收消息选项
}) async {
return await _channel.invokeMethod('modifyMemberInfo', {
"name": name,
"identifier": identifier,
"nameCard": nameCard,
"silence": silence,
"role": role,
"receiveMessageOpt": receiveMessageOpt == null
? null
: receiveMessageOpt
.toString()
.replaceAll("ReceiveMessageOptEnum.", ""),
});
}
java端
private void modifyMemberInfo(MethodCall methodCall, final Result result) {
// 群ID
String groupId = this.getParam(methodCall, result, "groupId");
// 群成员ID
String identifier = this.getParam(methodCall, result, "identifier");
// 名片
String nameCard = methodCall.argument("nameCard");
// 接收消息选项
String receiveMessageOpt = methodCall.argument("receiveMessageOpt");
// 禁言时间
Long silence = methodCall.argument("silence");
// 角色
Integer role = methodCall.argument("role");
// 自定义信息
String customInfo = methodCall.argument("customInfo");
...省略
}
dart端的第一个参数name
是否是java端的groupId
?
参考 Android: https://cloud.tencent.com/document/product/269/9236#.E5.88.9B.E5.BB.BA.E7.BE.A4.E7.BB.84 iOS:https://cloud.tencent.com/document/product/269/9152#.E5.88.9B.E5.BB.BA.E6.8C.87.E5.AE.9A.E5.B1.9E.E6.80.A7.E7.BE.A4.E7.BB.84
另外V2版本的createGroup接口我貌似没有发现自定义数据的参数,不知道你那边怎么看?是移到别的地方去了吗?
目前调用addFriend方法后,对方直接就变成了自己的好友,没有发现配置加好友选项的地方。
看官方文档应该是有这样一个方法来配置:
TIMFriendshipManager.getInstance().setAllowType(TIMFriendAllowType.TIM_FRIEND_NEED_CONFIRM, new TIMCallBack(){
@Override
public void onError(int code, String desc){
//错误码code和错误描述desc,可用于定位请求失败原因
//错误码code列表请参见错误码表
Log.e(tag, "setAllowType failed: " + code + " desc");
}
还是说是我没找到接口?
这个有实现不
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.