React Native SDK Implementation
Demo App

Samvyo Demo App

To get started with the Samvyo React Native SDK, you can either set up and integrate the SDK into your application from scratch or clone our demo app to skip the initial setup steps. Follow these instructions to get started quickly.

Clone the Demo App

  1. Clone the demo app repository from GitHub:
git clone https://github.com/Samvyo/basic-native-demo-app.git
  1. Navigate to the cloned directory:
cd basic-native-demo-app

Set Up the Demo App Server

  1. Clone the demo app server repository from GitHub:
git clone https://github.com/Samvyo/react-native-demo-app-server.git
  1. Navigate to the cloned server directory:
cd react-native-demo-app-server
  1. Modify the .env.sample file to .env in the root directory of the server project.

  2. Open the .env file and update the following lines with your actual access key and secret access key:

ACCESS_KEY = your_access_key;
SECRET_ACCESS_KEY = your_secret_access_key;
  1. Start the demo app server:
npm install
npm start

The server will run by default at http://localhost:3000.

Update the App.js File

  1. Open the App.js file in the demo app project.
  2. Update the apiUrl variable to point to the server URL. By default, it will be set to http://localhost:3000.

Connect an Android Emulator or Physical Device

  1. Ensure you have an Android emulator running or a physical Android device connected via USB with USB debugging enabled.
  2. For iOS, ensure you have a Mac with Xcode installed and a simulator or physical device connected.

Start the Metro Bundler

  1. Start the Metro bundler by running:
npm run start

Run the App

  • For Android, run:
npm run android
  • For iOS, run:
npm run ios

Summary

By following these steps, you can set up the Samvyo demo React Native app locally and start exploring its features. The demo app server handles backend operations, while the app itself demonstrates how to use the Samvyo SDK for real-time video and audio communication. If you encounter any issues, ensure the server is running and the apiUrl in App.js is correctly configured.

If you prefer to set up and integrate the SDK into your application from scratch, you can refer to the events and methods documentation and follow the next steps for a detailed explanation.