Configure Android

Integrate the React Native SDK with your Android app

OpenWeb's React Native SDK enables you to seamlessly integrate web features and monetization strategies into your Android app. The SDK allows you to incorporate engaging content and ads without compromising app performance or user experience.

The React Native SDK for Android offers the following benefits:

  • Ensure smooth performance across Android devices
  • Simplify setup in Android Studio for quick integration
  • Increase user interaction with engaging web features
  • Support banner and interstitial ads to boost revenue


OpenWeb Native View Configuration

Follow these steps to configure the Android native view with the React Native SDK:

  1. From Android Studio, open your app.

  2. In the app build.gradle file, add the androidx.multidex:multidex:2.0.1 dependency.

    dependencies {
        ...
        implementation 'androidx.multidex:multidex:2.0.1'
    }
    
  3. Set minSdkVersion to 23 or greater. Additionally, set multiDexEnabled to true.

    android {
        defaultConfig {
            ...
            minSdkVersion 23
            multiDexEnabled true
        }
    
  4. In the AndroidManifest.xml file, add the Internet permission (<uses-permission android:name="android.permission.INTERNET" />).



Support Image Attachments

The React Native SDK enables users to add images to comments from a camera or photo library on an Android device.

Follow this step to allow image attachments:

  1. In the AndroidManifest.xml file, add the following permissions.

    <uses-feature android:name="android.hardware.camera" android:required="false" />
    
       <uses-permission android:name="android.permission.INTERNET" />
       <uses-permission android:name="android.permission.CAMERA"/>
        
         <application
    
       		...
           
         </application>