---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ads.yandex.com/helpcenter/en/dev/android7/release/7-0-0-migration.md
  - https://ads.yandex.com/helpcenter/ru/dev/android7/release/7-0-0-migration.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ads.yandex.com/helpcenter/en/llms.txt

# Guide on migrating to version 7

## New method for generating a bidder token

### SDK 6

{% list tabs %}

- Kotlin

  ```kotlin
  BidderTokenLoader.loadBidderToken(context, bidderTokenLoadListener)
  ```
  
- Java

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

{% endlist %}

### SDK 7

{% list tabs %}

- Kotlin

  ```kotlin
  BidderTokenLoader.loadBidderToken(context, bidderTokenRequestConfiguration, bidderTokenLoadListener)
  ```
  
- Java

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

{% endlist %}

`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

   ```kotlin
   val value = ratingImpl.rating
   ratingImpl.rating = 2
   ```

### SDK 7

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

## VideoPlayer interface

Override properties rather than methods in `VideoPlayer` implementations from Kotlin.

### SDK 6

   ```kotlin
   class VideoPlayerImpl : VideoPlayer {

       //...

       override fun getVideoPosition(): Long = TODO()

       override fun getVideoDuration(): Long = TODO()

       override fun getVolume(): Float = TODO()

       //...

   }
   ```

### SDK 7

   ```kotlin
   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

  ```kotlin
  MobileAds.getLibraryVersion()
  ```

### SDK 7

  ```kotlin
  MobileAds.libraryVersion
  ```
