Open sairope opened 2 years ago
I've updated my code from the original ANE, and now I have the following in my Class:
var extraParam=new ExtraParameter(); extraParam.testDeviceID="false"; extraParam.nonPersonalizedAds=true; if (Admob.getInstance().supportDevice){ Admob.getInstance().initAdmobSDK(extraParam); Admob.getInstance().showBanner(bannerID,AdmobSize.SMART_BANNER,AdmobPosition.TOP_CENTER,0,extraParam); Admob.getInstance().cacheInterstitial(fullID,extraParam); }
I've added the necessary permisions to the descriptor file inlcluding:
I get no errors, but I don't see any ads with this new GMA 21 ane. Ads display just fine in the old ane. So what am I doing wrong?
this is the code i use with admob test ID's you can change it to your real ID's when you want to publish it. it's working fine. in your code i didn't see where you show the interstitial. ( if(Admob.getInstance().isInterstitialReady()) { Admob.getInstance().showInterstitial(); } ), you will not see interstitial this way you need to call showInterstitial(); this is my code i use.
///////////////////////////////////////////////////////////////////////////////////////////////////////////
import so.cuo.platform.admob.Admob; import so.cuo.platform.admob.AdmobPosition; import so.cuo.platform.admob.AdmobSize; import so.cuo.platform.admob.ExtraParameter;
private var admob:Admob;
public var extraParam:ExtraParameter;
Admob.getInstance().initAdmobSDK(new ExtraParameter()); this.extraParam = new ExtraParameter();
Admob.getInstance().cacheInterstitial("ca-app-pub-3940256099942544/1033173712");
Admob.getInstance().showBanner("ca-app-pub-3940256099942544/6300978111",AdmobSize.SMART_BANNER,AdmobPosition.BOTTOM_CENTER);
if(Admob.getInstance().isInterstitialReady())
{
Admob.getInstance().showInterstitial();
}
Admob.getInstance().cacheInterstitial("ca-app-pub-3940256099942544/1033173712");
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bannerID
you need to declare this var and give it the string value of the id, or just use the ID directly "ca-app-pub-...." .
Thanks, I've managed to get the ads to display, but there's definitely an issue when it comes to ExtraParameter. If I define it and then try to procide it into showBanner, ad doesn't get displayed.
extraParam=new ExtraParameter(); extraParam.testDeviceID="true"; extraParam.nonPersonalizedAds=true;
//This code results in no ad getting displayed. 'bannerID' is a string variable with my banner ID. Admob.getInstance().showBanner(bannerID,AdmobSize.SMART_BANNER,AdmobPosition.TOP_CENTER,0,extraParam);
//With the removal of two last parameters, banner gets displayed. Do ExtraParameter properties apply here also, or does it have to be done as presented above. Admob.getInstance().showBanner(bannerID,AdmobSize.SMART_BANNER,AdmobPosition.TOP_CENTER);
Is it a bug, or am I doing someting wrong? I need to be able to define ExtraParameter to make sure my ads meet Google requirements, e. g. when user opts for nonpersonalized ads.
i don't remember i touched something about ExtraParameter in project but i will see the old classes in old project to see if i've changed something, i never used ExtraParameters in my apps. i will see.
@sairope yes you are right thanks, i had a bug there, i resolve it; now everything is working fine. you can use the updated ANE now.
where is ios ane? any one ?
where is ios ane? any one ?
i hope lilili87222 update the ios one, i don't own a mac.
where is ios ane? any one ?
this is a new ios and android admob ane if you're still interested https://github.com/nboy1/Admob-for-Flash-ANE-GMA21-GLM-
I've updated my code from the original ANE, and now I have the following in my Class:
I've added the necessary permisions to the descriptor file inlcluding:
I get no errors, but I don't see any ads with this new GMA 21 ane. Ads display just fine in the old ane. So what am I doing wrong?