TOP > Migration
When migrating from a version lower than v1.4.0 to v1.4.0 or above, the following new steps are required.
In the onCreate method of the class that inherits Application
, implement as follows and launch the SDK.
class SampleApplication : Application() {
override fun onCreate() {
// Launch SDK
Runa.init(this).also {
// For output debug log according to status
it.debug = BuildConfig.DEBUG
}
}
...
- If AdView is placed directly under ConstraintLayout and AspectFit is specified for
adSpotSize
, the margin specification will not work.
Therefore, if wrap_content is defined for layout_width, specify match_content.
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.rakuten.android.ads.runa.AdView
android:id="@+id/adView"
android:layout_width="match_parent" <------ wrap_content to match_parent
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
app:adSpotId="XXX"
app:adSpotSize="AspectFit"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
LANGUAGE :