Android – startapp insert ads are not displayed in oncreate
•
Android
This is in oncreate:
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
StartAppAd.init(this, "devID", "appID");
setContentView(R.layout.activity_results);
startAppAd.showAd();
startAppAd.loadAd();
}
And it doesn't display ads, but if I change it to:
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
StartAppAd.init(this, "devID", "appID");
setContentView(R.layout.activity_results);
new Handler().postDelayed(new Runnable()
{
@Override
public void run()
{
startAppAd.showAd();
startAppAd.loadAd();
}
}, 2000);
}
Useful. How to display the advertisement immediately after it is ready?
resolvent:
I solved this problem by simply putting loadad(); Oncreate and showad() in the previous activity; In my startintent(); Before
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码