Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__ init. react-native agora quick start Feb 22, 2019
android fix. active android permission & update to react-native-agora-alpha Feb 28, 2019
assets/images init. react-native agora quick start Feb 22, 2019
docs chore. update doc Feb 26, 2019
ios Merge pull request #4 from AgoraIO-Community/upgrade/enhance-android-… Feb 28, 2019
src fix. missing list key property May 21, 2019
.buckconfig init. react-native agora quick start Feb 22, 2019
.flowconfig
.gitattributes init. react-native agora quick start Feb 22, 2019
.gitignore init. react-native agora quick start Feb 22, 2019
.watchmanconfig init. react-native agora quick start Feb 22, 2019
App.js init. react-native agora quick start Feb 22, 2019
LICENSE Initial commit Feb 19, 2019
README.md Update README.md Mar 26, 2019
README.zh.md Update README.zh.md Mar 26, 2019
app.json init. react-native agora quick start Feb 22, 2019
babel.config.js init. react-native agora quick start Feb 22, 2019
index.js init. react-native agora quick start Feb 22, 2019
package.json chore. update to 2.4.0-alpha.4 May 16, 2019

README.md

Agora ReactNative Quickstart

其他语言版本: 简体中文

This tutorial describes how to create an Agora account and build a sample app with Agora using React Native.

The React Native SDK source can be found here, checkout here for the full API Reference.

Prerequisites

  • Agora.io Developer Account
  • react-native 0.58.x
  • nodejs v10.15.x
  • iOS & Android sdk
  • real mobile phone

Quick Start

This repository shows you how to use Agora React Native SDK to build a simple video call app. It demonstrates you how to:

  • Join / leave a channel
  • Mute / unmute audio
  • Switch camera views
  • Layout multiple video views

Create an Account and Obtain an App ID

To build and run the sample application, first obtain an app ID:

  1. Create a developer account at agora.io. Once you finish the sign-up process, you are redirected to the dashboard.
  2. Navigate in the dashboard tree on the left to Projects > Project List.
  3. Copy the app ID that you obtain from the dashboard into a text file. You will use this when you launch the app.

Update and Run the Sample Application

Open the settings.js file and add the app ID.

  const APPID = "";

Step 1. install node dependencies & link native modules

Run the below commands in this project directory:

  npm install
  react-native link react-native-agora
  react-native link react-navigation
  react-native link react-native-gesture-handler
  react-native link react-native-vector-icons

Step 2. start react native package server

Once the build is complete, run the run command to start the package server.

  # start app
  npm run start

Step 3. run in native platform

android platform:
  react-native run-android
ios platform:
  1. cd ios; pod install
  2. open ios/AgoraRNQuickStart.xcworkspace open in xcode
  3. Find Libraries -> RCTAgora.xcodeproj -> Build Phases -> Link Binary With Libraries -> AgoraRtcEngineKit.Framework and replace by ios/Pods/AgoraRtcEngine_iOS/AgoraRtcEngineKit.Framework
  4. xcode build

Adding react-native-agora to your project

  1. cd into_your_project_path
  2. npm install react-native-agora --save
  3. react-native link react-native-agora
  4. build and run it. you can run react-native run-android directly to build android platform.

Building on iOS Platform

  1. you should add pod "react-native-agora", path: "../node_modules/react-native-agora" in to Podfile and install the pod by pod install
  2. open the .xcworkspace in xcode.
  3. add RCTAgora.xcodeproj to Libraries. add RCTAgora.xcodeproj to Libraries. step 1 add RCTAgora.xcodeproj to Libraries. step 2
  4. find AgoraRtcEngineKit.framework from your Pods folder and replace AgoraRtcEngineKit.framework in RCTAgora by dragging it into Your Project -> Libraries -> RCTAgora.xcodeproj -> Build Phases -> Link Binary With Libraries drag_sdk_into_your_project_rctagora_link_binary_with_libraires

Resources

License

This software is under the MIT License (MIT).

You can’t perform that action at this time.