Initialize an Adrop instance with your app's Application Context
MainActivity.kt
import io.adrop.ads.Adrop// ..overridefunonCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)setContentView(R.layout.activity_main)// 1. use Application Context// 2. true for production// 3. If you are using this SDK in specific countries, // pass an array of ISO 3166 alpha-2 country codes. Adrop.initialize( application, production =false, targetCountries =arrayOf<String>())}
MainActivity.java
importio.adrop.ads.Adrop;// ..@OverrideprotectedvoidonCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);// 1. use Application Context// 2. true for production// 3. If you are using this SDK in specific countries, // pass an array of ISO 3166 alpha-2 country codes.boolean production =true;String[] targetCountries = {};Adrop.INSTANCE.initialize(getApplication(), production, targetCountries);}
When production is false, you can check error logs.