tamworth / react-native-agora-rte-chatview

agora rte im widget

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-agora-rte-chatview

Getting started

$ npm install react-native-agora-rte-chatview --save

Mostly automatic installation

$ react-native link react-native-agora-rte-chatview

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-agora-rte-chatview and add RNAgoraRteChatview.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNAgoraRteChatview.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.agorarte.chat.RNAgoraRteChatviewPackage; to the imports at the top of the file
  • Add new RNAgoraRteChatviewPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-agora-rte-chatview'
    project(':react-native-agora-rte-chatview').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-agora-rte-chatview/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-agora-rte-chatview')
    

Usage

import RNAgoraRteChatview from 'react-native-agora-rte-chatview';

const chatInfo = {
	appKey: "1129210531094378#apaas-edu",
	chatRoomId:  '185131943919617',
	nickName:  'ssssssss',
	roomUuid:  'rrrrrrrr0',
	userName:  'c71db6b1dadb6bf72adf083611e2150b',
}

<RNAgoraRteChatview style={{flex:1}} chatInfo= {chatInfo} />

// TODO: What to do with the module?
RNAgoraRteChatview;

About

agora rte im widget


Languages

Language:Objective-C 90.6%Language:Kotlin 7.7%Language:TypeScript 0.8%Language:Ruby 0.6%Language:C 0.4%