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:
-
From Android Studio, open your app.
-
In the app build.gradle file, add the
androidx.multidex:multidex:2.0.1
dependency.
dependencies { ... implementation 'androidx.multidex:multidex:2.0.1' }
-
Set
minSdkVersion
to23
or greater. Additionally, setmultiDexEnabled
totrue
.
android { defaultConfig { ... minSdkVersion 23 multiDexEnabled true }
-
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:
-
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>
Updated 9 months ago