Skip to main content

Configure the manifest

Configure the manifest in your Android project.

To complete the SDK import process, use the following steps to configure the AndroidManifest.xml file:

  1. In the app/manifests/AndroidManifest.xml file, in all <activity> elements that will contain a player, add the following changes (configChanges and screenOrientation). This will prevent activity from being destroyed when rotated and will handle orientation changes. If you are using the Demo app, this is included.
<activity
android:name="vpplayer.DemoActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
... />
  1. Add internet permission
<uses-permission android:name="android.permission.INTERNET" />
  1. (Optional) If your app reads media content from the user's device, add the code snipped below.
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

Android's Request App Permissions guide explains how requesting permissions works.

<application>
...
<activity
...
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />
</application>

You have configured the manifest. You can now add the player to your activity.