插屏广告
Last updated
Last updated
Adx3InsertAdView view = new Adx3InsertAdView(this,"UnitId");view.setOpt(0); view.setListener(new AdListener() {
@Override
public void show() {
//Code to be executed when the ad has been showed int Screen
}
@Override
public void loadFaild() {
//Code to be executed when the ad load faild
}
@Override
public void loadSucces() {
//Code to be executed when the ad load success
}
@Override
public void adClose() {
//Code to be executed when the ad close by user
}
@Override
public void adClick() {
//Code to be executed when user click the ad
}
@Override
public void adComplate() {
//Code to be executed when the ad is finish
}
@Override
public void adSkip() {
//Code to be executed when user skip the ad not wait for finish it
}
@Override
public void clickUrl(String url) {
//Code to be executed when user click the ad and tell the url to uesr
}
});view.loadAd();public class MainActivity extends AppCompatActivity {
Adx3InsertAdView view;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//TODO use Create to Add AdView
view = new Adx3InsertAdView(getContext(),"UnitId");
//TODO load the AD
view.loadAd();
}
}