Comments (25)
下一个计划就是离线推送,它会在完成后推出
from fluttertencentimplugin.
你的意思是,想给会话设置自定义参数吗?
from fluttertencentimplugin.
是的,我们之前用的极光,会有一个 setExtras, 可以给会话保存一个 map,不知道这个功能有没有?
@JiangJuHong
from fluttertencentimplugin.
我没有找到腾讯云IM给会话设置自定义参数的相关接口,或许你可以使用本地缓存来实现,据我所知,腾讯云所有 customInt 和 customStr 仅会存在本地。
from fluttertencentimplugin.
您的意思是修改好友的
TIM_FRIEND_PROFILE_TYPE_KEY_CUSTOM_PREFIX
的这个值来实现吗,这个 key 的 value 一直不知道是啥
好像这个还需要在腾讯云 IM 后台配置字段,才能修改,似乎也是同步的?
from fluttertencentimplugin.
这个是代表好友关系链相关的值,如果业务复杂,可以这么做,但是不建议。
如果你的自定义值只是在本地,可以使用 Flutter缓存插件,将 会话 ID 与 对应的自定义缓存值存储在本地,�这可能会有效。
目前我没有想到更好的解决办法。
from fluttertencentimplugin.
好的,谢谢了
另外,因为 TIMUserProfile, TIMFriend 这两个类没有,
我现在还没有找到修改个人信息时,应该填什么 key 😂😂😂😂
Map<String ,dynamic> params = {" what is the key ??" : "新名字"};
TencentImPlugin.modifySelfProfile(params: params);
腾讯的文档里只列了类的属性,没有列出来值
Key | Value | 说明 |
---|---|---|
TIM_PROFILE_TYPE_KEY_NICK | String | 昵称 |
TIM_PROFILE_TYPE_KEY_FACEURL | String | 头像 |
TIM_PROFILE_TYPE_KEY_ALLOWTYPE | String | 好友申请 |
TIM_PROFILE_TYPE_KEY_GENDER | int | 性别 |
TIM_PROFILE_TYPE_KEY_BIRTHDAY | int | 生日 |
TIM_PROFILE_TYPE_KEY_LOCATION | String | 位置 |
TIM_PROFILE_TYPE_KEY_LANGUAGE | int | 语言 |
TIM_PROFILE_TYPE_KEY_LEVEL | int | 等级 |
TIM_PROFILE_TYPE_KEY_ROLE | int | 角色 |
TIM_PROFILE_TYPE_KEY_SELFSIGNATURE | String | 签名 |
TIM_PROFILE_TYPE_KEY_CUSTOM_PREFIX | String, int | 自定义字段前缀 |
from fluttertencentimplugin.
应该填写的Key就为Key这一列,比如Key是TIM_PROFILE_TYPE_KEY_NICK,值是:123,就代表将昵称修改为 123
from fluttertencentimplugin.
Map<String ,dynamic> params = {"TIM_PROFILE_TYPE_KEY_NICK":"newname"};
TencentImPlugin.modifySelfProfile(params: params);
会报错: invalid_tag
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(40009, Execution Error, Err_Profile_Invalid_Tag:TIM_PROFILE_TYPE_KEY_NICK)
from fluttertencentimplugin.
profileMap.put(TIMUserProfile.TIM_PROFILE_TYPE_KEY_CUSTOM_PREFIX + "Blood", 1);
它用的用法举例里是这样的
from fluttertencentimplugin.
错误码 40009 对应的错误信息是 资料字段的 Tag 不存在。
,你使用它推荐的办法是否可以成功执行?
from fluttertencentimplugin.
它推荐的方法是在安卓 SDK 下的,安卓下有这个类 TIMUserProfile,TIM_PROFILE_TYPE_KEY_CUSTOM_PREFIX 这个是这个类的一个属性,但FlutterTencentImPlugin没有这个类或者枚举
from fluttertencentimplugin.
这应该是插件的缺失,我将在后续版本完善,但是它应该不影响程序的运作(如果你能知道对应Key的值的话)
from fluttertencentimplugin.
急着写一个极光的后补方案
知道这个 key 的值在哪吗
Key | Value | 说明 |
---|---|---|
TIM_PROFILE_TYPE_KEY_NICK | String | 昵称 |
TIM_PROFILE_TYPE_KEY_FACEURL | String | 头像 |
TIM_PROFILE_TYPE_KEY_ALLOWTYPE | String | 好友申请 |
TIM_PROFILE_TYPE_KEY_GENDER | int | 性别 |
TIM_PROFILE_TYPE_KEY_BIRTHDAY | int | 生日 |
TIM_PROFILE_TYPE_KEY_LOCATION | String | 位置 |
TIM_PROFILE_TYPE_KEY_LANGUAGE | int | 语言 |
TIM_PROFILE_TYPE_KEY_LEVEL | int | 等级 |
TIM_PROFILE_TYPE_KEY_ROLE | int | 角色 |
TIM_PROFILE_TYPE_KEY_SELFSIGNATURE | String | 签名 |
TIM_PROFILE_TYPE_KEY_CUSTOM_PREFIX | String, int | 自定义字段前缀 |
去 sdk 里找的这个也不对
from fluttertencentimplugin.
from fluttertencentimplugin.
我尝试了还是不对
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(40009, Execution Error, Err_Profile_Invalid_Tag:user_profile_item_nick_name)
from fluttertencentimplugin.
好的,我会检查这是否有问题,有结果后告诉你
from fluttertencentimplugin.
不知道有结果了吗
from fluttertencentimplugin.
您好,修改资料这个,有解决办法了吗?
@JiangJuHong
from fluttertencentimplugin.
你好,目前我还没有时间修复这个问题,我会在有时间后尽快排查这个问题
from fluttertencentimplugin.
翻遍文档,终于在服务端 sdk 里找到了路径
字段名称 | 类型 | 描述 | 更新时有 Push | 备注 |
---|---|---|---|---|
Tag_Profile_IM_Nick | string | 昵称 | 有 | 长度不得超过500个字节 |
Tag_Profile_IM_Gender | string | 性别 | 有 | Gender_Type_Unknown:没设置性别Gender_Type_Female:女性Gender_Type_Male:男性 |
Tag_Profile_IM_BirthDay | uint32 | 生日 | 有 | 推荐用法:20190419 |
Tag_Profile_IM_Location | string | 所在地 | 有 | 长度不得超过16个字节,推荐用法如下:App 本地定义一套数字到地名的映射关系后台实际保存的是4个 uint32_t 类型的数字其中第一个 uint32_t 表示国家第二个 uint32_t 用于表示省份第三个 uint32_t 用于表示城市第四个 uint32_t 用于表示区县 |
Tag_Profile_IM_SelfSignature | string | 个性签名 | 有 | 长度不得超过500个字节 |
Tag_Profile_IM_AllowType | string | 加好友验证方式 | 有 | AllowType_Type_NeedConfirm:需要经过自己确认才能添加自己为好友AllowType_Type_AllowAny:允许任何人添加自己为好友AllowType_Type_DenyAny:不允许任何人添加自己为好友 |
Tag_Profile_IM_Language | uint32 | 语言 | 有 | 无 |
Tag_Profile_IM_Image | string | 头像URL | 有 | 长度不得超过500个字节 |
Tag_Profile_IM_MsgSettings | uint32 | 消息设置 | 有 | 标志位:Bit0:置0表示接收消息,置1则不接收消息 |
Tag_Profile_IM_AdminForbidType | string | 管理员禁止加好友标识 | 有 | AdminForbid_Type_None:默认值,允许加好友AdminForbid_Type_SendOut:禁止该用户发起加好友请求 |
Tag_Profile_IM_Level | uint32 | 等级 | 有 | 通常一个 UINT-8 数据即可保存一个等级信息您可以考虑拆分保存,从而实现多种角色的等级信息 |
Tag_Profile_IM_Role | uint32 | 角色 | 有 | 通常一个 UINT-8 数据即可保存一个角色信息您可以考虑拆分保存,从而保存多种角色信息 |
from fluttertencentimplugin.
现在求快加上离线推送~~
from fluttertencentimplugin.
你通过 https://cloud.tencent.com/document/product/269/1500#.E6.A0.87.E9.85.8D.E8.B5.84.E6.96.99.E5.AD.97.E6.AE.B5 将资料修改成功了吗
from fluttertencentimplugin.
你通过 https://cloud.tencent.com/document/product/269/1500#.E6.A0.87.E9.85.8D.E8.B5.84.E6.96.99.E5.AD.97.E6.AE.B5 将资料修改成功了吗
是的
from fluttertencentimplugin.
好的,感谢你的贡献,我会在文档中标出这个地址
from fluttertencentimplugin.
Related Issues (20)
- android release包闪退 HOT 8
- 请问下新版的群简介怎么拿到,之前的版本会话列表中可以取到群简介 HOT 1
- 大佬能不能顺便也支持一下web HOT 2
- android createGroup 返回的groupID有非法字符 " HOT 2
- ios setGroupInfo必须指定全部字段,否则其他字段会被清空(android没这个问题) HOT 4
- 似乎是跟flutter_sound插件的依赖版本起冲突,请问该如何解决? HOT 4
- ios编译报错 HOT 1
- 请问直接关闭App的时候有办法让IM执行退出登录操作吗? HOT 1
- 如何更新本地的IM用户的信息呢? HOT 5
- Swift里的JsonUtil无法解析特殊字符 HOT 6
- flutter2.5.3 ios运行模拟器报错 HOT 16
- 可以支持下 insertC2CMessageToLocalStorage 这个方法嘛? HOT 2
- 发送失败后,调用resendMessage接口,并不能改变消息的发送状态status(依旧为MessageStatusEnum.SendFail) HOT 1
- ios 调用sendMessage 时 真机闪退 HOT 11
- 消息发送是否支持CloudCustomData HOT 9
- 麻烦添加一下x64支持 HOT 1
- 安卓机在进行会话监听时闪退 HOT 23
- `TencentImPlugin.setSelfInfo` 不生效或失败, 导致该用户聊天时获取到的`faceUrl`为null 或 不更新是旧头像, 但是试了腾讯官方的demo, 没有该问题 HOT 6
- DeviceToken
- 通过ref引入编译失败 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluttertencentimplugin.