Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
react-native-tim-js
Advanced tools
腾讯云官方IM React Native SDK
, 可轻松集成聊天、会话、群组、资料管理能力,帮助您实现文字、图片、短语音、短视频等富媒体消息收发,全面满足通信需要。
npm install react-native-tim-js
yarn add react-native-tim-js
import { TencentImSDKPlugin } from 'react-native-tim-js';
// 获取IM实例
const timManger = TencentImSDKPlugin.v2TIMManager;
// 群组高级接口,包含了群组的高级功能,例如群成员邀请、非群成员申请进群等操作接口。
const groupManager = timManager.getGroupManager();
// 高级消息接口, 包含了创建消息,发送消息,获取历史消息等接口
const messageManager = timManager.getMessageManager();
// 关系链接口,包含了好友的添加和删除,黑名单的添加和删除等逻辑。
const friendshipManager = timManager.getFriendshipManager();
// 会话接口,包含了会话的获取,删除和更新的逻辑。
const conversationManager = timManager.getConversationManager();
// 离线推送接口
const offlinePushManager = timManager.getOfflinePushManager();
// 信令接口,包含
const signalingManager = timManager.getSignalingManager();
// 初始化SDK
const sdkAppID = 0; // 前提条件第二部申请的sdkAppID
const logLevel = LogLevelEnum.V2TIM_LOG_DEBUG;
await timManger.initSDK(sdkAppID, logLeve);
// 登录
const userID = 123456; // 用户登录ID
const userSig = "xxx"; // userSig 生成请参考 [UserSig 后台 API](https://cloud.tencent.com/document/product/269/32688)
timManger.login(userID, userSig);
// 发送第一条消息
const friendID = 456789; // 接收消息用户ID
const text = "Hello, Tencent IM";
timManger.sendC2CTextMessage(friendID, text);
// 登出
timManager.logout();
更多接口使用请参考example;
FAQs
Tencent IM SDK for react native
The npm package react-native-tim-js receives a total of 11 weekly downloads. As such, react-native-tim-js popularity was classified as not popular.
We found that react-native-tim-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.