Guide on migrating to version 7

New method for generating a bidder token

SDK 6

BidderTokenLoader.loadBidderToken(context, bidderTokenLoadListener)
BidderTokenLoader.loadBidderToken(context, bidderTokenLoadListener);

SDK 7

BidderTokenLoader.loadBidderToken(context, bidderTokenRequestConfiguration, bidderTokenLoadListener)
BidderTokenLoader.loadBidderToken(context, bidderTokenRequestConfiguration, bidderTokenLoadListener);

BidderTokenRequestConfiguration contains information required to obtain a bidder token and is created using BidderTokenRequestConfiguration$Builder. When creating it, pass the format of requested ads. If the format is banner ads, pass the size as well.

Rating interface

Use methods rather than properties in the Rating interface from Kotlin.

SDK 6

val value = ratingImpl.rating
ratingImpl.rating = 2

SDK 7

val value = ratingImpl.getRating()
ratingImpl.setRating(2)

VideoPlayer interface

Override properties rather than methods in VideoPlayer implementations from Kotlin.

SDK 6

class VideoPlayerImpl : VideoPlayer {

    //...

    override fun getVideoPosition(): Long = TODO()

    override fun getVideoDuration(): Long = TODO()

    override fun getVolume(): Float = TODO()

    //...

}

SDK 7

class VideoPlayerImpl : VideoPlayer {

    //...

    override val videoPosition: Long
        get() = TODO()

    override val videoDuration: Long
        get() = TODO()

    override val volume: Float
        get() = TODO()

    //...

}

MobileAds version obtaining

Use property instead of method in MobileAds version obtaining in Kotlin.

SDK 6

MobileAds.getLibraryVersion()

SDK 7

MobileAds.libraryVersion