Difference between revisions of "Android Studio: HMS Video Play Kit"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
| Line 13: | Line 13: | ||
implementation 'com.huawei.hms:videokit-player-fallback:1.0.10.300' | implementation 'com.huawei.hms:videokit-player-fallback:1.0.10.300' | ||
} | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | In the AndroidManifest.xml file, add the following permissions for your app: | ||
| + | |||
| + | // Add the permission to access the Internet. | ||
| + | <uses-permission android:name="android.permission.INTERNET" /> | ||
| + | // Add the permission to obtain the network status. | ||
| + | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
| + | // Add the permission to access the Wi-Fi network. | ||
| + | <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | ||
| + | // Add the permission to write data into external storage. | ||
| + | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
| + | // Add the permission to read data from external storage. | ||
| + | <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||
| + | // (Optional) Add the permission to read device information, which helps users better experience the functions of WisePlayer. | ||
| + | <uses-permission android:name="android.permission.READ_PHONE_STATE" /> | ||
| + | // Add the permission to check whether a device is rooted. | ||
| + | <uses-permission android:name="com.huawei.permission.SECURITY_DIAGNOSE" /> | ||
Revision as of 09:59, 17 March 2022
Configure Maven dependencies in the build.gradle file under the app directory of your Android Studio project.
dependencies {
......
implementation "com.huawei.hms:videokit-player:1.0.10.300"
}
If you want your app to use Video Kit without relying on HMS Core (APK), add the following fallback dependencies in the dependencies block.
dependencies {
implementation 'com.huawei.hms:videokit-player-fallback:1.0.10.300'
}
In the AndroidManifest.xml file, add the following permissions for your app:
// Add the permission to access the Internet. <uses-permission android:name="android.permission.INTERNET" /> // Add the permission to obtain the network status. <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> // Add the permission to access the Wi-Fi network. <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> // Add the permission to write data into external storage. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> // Add the permission to read data from external storage. <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> // (Optional) Add the permission to read device information, which helps users better experience the functions of WisePlayer. <uses-permission android:name="android.permission.READ_PHONE_STATE" /> // Add the permission to check whether a device is rooted. <uses-permission android:name="com.huawei.permission.SECURITY_DIAGNOSE" />