Follow these steps to integrate and configure the Auto Update SDK in your Android project.
Step 1 | Import the SDK
Import the Auto Update SDK file into your project.
Step 2 | Modify the Android manifest file
Update your AndroidManifest file to include the necessary permissions, activity, and content provider.
- Include these permissions:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
- Add an activity to request installation permissions from the players:
<activity
android:name="com.appcharge.update.InstallPermissionHelperActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:exported="false" />
- Add the following provider tag in the
<application>
tag:
<provider
android:name="com.appcharge.update.UpdateContentProvider"
android:authorities="{YOUR_PACKAGE_NAME}.updatecontentprovider"
android:exported="false"
android:grantUriPermissions="true" />
Step 3 | Configure the SDK
To configure the SDK, create an instance of the BridgeAPI
:
private val bridge = BridgeAPI()