Reputation: 11164
I'm trying to integrate MoPub into my application but I am not sure on where exactly to place the code snippet inside the onCreate()
method of my activity:
mAdView = (MoPubView) findViewById(R.id.adview);
mAdView.setAdUnitId("xxxxxxxxxxx"); // Enter your Ad Unit ID from www.mopub.com
mAdView.loadAd();
Do i place it before or after the call to super.onCreate(savedInstanceState);
?
Yes, I know it's a very trivial question.
Upvotes: 1
Views: 352
Reputation: 56925
Write your code after setContentView
because you use findViewById for mAdView.
Upvotes: 3