It operates on Android API level 16 (Android 4.1) or higher.
Video advertising support requires separate installation of the ExoPlayer library.
Add the following to build.gradle
and execute Sync Projects with Gradle Files
repositories {
maven { url 'https://raw.github.com/fout/RFP-Android-SDK/master/repos/' }
}
dependencies {
compile 'jp.fout.rfp.android.sdk:rfp-sdk:x.x.x'
}
If the Google Play Services SDK is not yet installed, install from SDK Manager。
Add compile 'com.google.android.gms:play-services-base:11.0.+'
under dependencies in the module build.gradle using RFP-Android-SDK.
This supports Google Play Services version 8.3 and later. (We have primarily confirmed operability on version 11 and later.)
Amend the minSdkVersion
under android, defaultConfig for the build.gradle project used by RFP-Android-SDK to 16 (as this relies on the play-services version, adjust as necessary).
Execute Sync Projects with Gradle Files
.
Depending on the Google Play Service version used, it may be necessary to add the Google Maven repository.
allprojects {
repositories {
google()
// If you're using a version of Gradle lower than 4.1, you must instead use:
// maven {
// url 'https://maven.google.com'
// }
// An alternative URL is 'https://dl.google.com/dl/android/maven2/'
}
}
Describe the following content in AndroidManifest.xml.
<!-- Required permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application>
<!-- Description for using the google play service library -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
With RFP-Android-SDK, it is necessary to add ExoPlayer to play back video advertising. The supported ExoPlayer version is 2.9 and beyond. (We have primarily confirmed operability on version 2.14.0
.)
Add the following to build.gradle
and execute Sync Projects with Gradle Files
.
repositories {
maven { url 'https://raw.github.com/fout/RFP-Android-SDK/master/repos/' }
}
dependencies {
compile 'jp.fout.rfp.android.sdk:rfp-sdk:x.x.x'
compile 'com.google.android.gms:play-services-base:11.8.0'
// for rfp-video-sdk
// // Using exoplayer2.9
// implementation 'jp.fout.rfp.android.sdk:rfp-video-sdk-exoplayer29:x.x.x'
// implementation 'com.google.android.exoplayer:exoplayer-core:2.9.+'
// implementation 'com.google.android.exoplayer:exoplayer-hls:2.9.+'
// // Using exoplayer2.10
// implementation 'jp.fout.rfp.android.sdk:rfp-video-sdk-exoplayer210:x.x.x'
// implementation 'com.google.android.exoplayer:exoplayer-core:2.10.+'
// implementation 'com.google.android.exoplayer:exoplayer-hls:2.10.+'
// // Using exoplayer2.11
// implementation 'jp.fout.rfp.android.sdk:rfp-video-sdk-exoplayer211:x.x.x'
// implementation 'com.google.android.exoplayer:exoplayer-core:2.11.+'
// implementation 'com.google.android.exoplayer:exoplayer-hls:2.11.+'
// // Using exoplayer2.12
// implementation 'jp.fout.rfp.android.sdk:rfp-video-sdk-exoplayer212:x.x.x'
// implementation 'com.google.android.exoplayer:exoplayer-core:2.12.+'
// implementation 'com.google.android.exoplayer:exoplayer-hls:2.12.+'
// // Using exoplayer2.13
// implementation 'jp.fout.rfp.android.sdk:rfp-video-sdk-exoplayer213:x.x.x'
// implementation 'com.google.android.exoplayer:exoplayer-core:2.13.+'
// implementation 'com.google.android.exoplayer:exoplayer-hls:2.13.+'
// // Using exoplayer2.14
// implementation 'jp.fout.rfp.android.sdk:rfp-video-sdk-exoplayer214:x.x.x'
// implementation 'com.google.android.exoplayer:exoplayer-core:2.14.+'
// implementation 'com.google.android.exoplayer:exoplayer-hls:2.14.+'
}
This completes the deployment of Android Studio.