I've been testing this, and some changes are required in order to get this working through Google Play Services.
In first place you should remove all imports referencing to old com.google.ads.*
, since they are now located on com.google.android.gms.ads.*
.
As you mentioned, some more changes need to be done:
You cannot instantiate an AdRequest the way it used to be done, but using an AdRequest.Builder
as follows:
AdRequest adRequest = new AdRequest.Builder().build();
Also, make sure you replace the name of the package on all layouts, so they call <com.google.android.gms.ads.AdView
instead of <com.google.ads.AdView
.
I think that's all. Good luck!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…