Suggestions

close search

stringee-react-native-v2

Getting started

  1. In your terminal (Command Prompt in Windows), change into your React Native project's directory

  2. In your terminal (Command Prompt in Windows), run $ npm install [email protected]

React Native 0.60 or later and JDK 17 are required. Autolinking configures the native module automatically. Expo projects must use a development or production build; Expo Go is not supported because this package contains native code.

Installation

iOS

Stringee React Native SDK requires iOS 13.0 or later.

  1. In your terminal, change into the iOS directory and run the following command:

    pod install --repo-update
  2. After running CocoaPods, open the generated .xcworkspace file.

  3. Add camera and microphone usage descriptions to Info.plist if your app also uses call features:

    <key>NSCameraUsageDescription</key>
    <string>$(PRODUCT_NAME) uses Camera</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>$(PRODUCT_NAME) uses Microphone</string>

Android

Use an AndroidX-enabled project with minSdkVersion 21 or later.

  1. Permissions

    The Stringee Android SDK requires some permissions from your AndroidManifest

    • Open up android/app/src/main/AndroidManifest.xml
    • Add the following lines:
    <!--Internet-->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
  2. ProGuard/R8 rules for Stringee and WebRTC are included in the package. Keep your application's existing minification configuration; you do not need to enable minification specifically for Stringee.

The package already declares Stringee Android SDK 2.1.13 and WebRTC 144.7559.09; do not add those native dependencies again in the app.

Sample

You can view the complete React Native chat sample on GitHub: StringeeChatSample