Dear Partners!

In 2024, we will focus on the development of an updated publisher account in VK Ad Network. For myTarget partners we have simplified and automated the transition to the new interface. You can do it right now:

  1. Go to https://ads.vk.com/en/partner and click 'Sign in'.
  2. In the window that opens, select 'Import myTarget partner account' and allow access to it.
  3. All settings, details, sites, ad units and statistics will be automatically transferred to the new account. The budget of two accounts will be joint.
In the new account you will find: fast and convenient management, expanded statistics, new settings and formats.
Android SDK: Getting started

Integrating myTarget SDK for Android

Minimum supported Android version - 4.0 (API Level 14).

We recommend you to connect to the project Google Play Services library (module Ads Identifier com.google.android.gms:play-services-ads-identifier), it will allow better to target Ads on Google Advertising ID.

Using Gradle:

Add dependence in build.gradle file of your project:

dependencies {
    //... other dependences
    implementation 'com.my.target:mytarget-sdk:5.6.+'
}

Manual:

  1. Download latest version of mytarget-sdk.aar.
  2. Copy mytarget-sdk.aar to your project's libs directory.
  3. Add mytarget-sdk.aar to your project as a library.
  4. Add RecyclerView component from Android Support Library to your project as a library.
  5. Add ExoPlayer-core and ExoPlayer-hls components.
  6. If you are using Proguard add an exception:



-keep class com.my.target.** {*;} 

AndroidManifest.xml

Declare INTERNET and ACCESS_NETWORK_STATE permissions in the manifest section:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        ...
        >
        ...
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
...
</manifest>
Declare MyTargetActivity in the application section:

<application ....>
...
<activity android:name="com.my.target.common.MyTargetActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application>
Was this article helpful?