![]() ![]() I'll hook back up with you on Monday and help you out. If you're still having trouble with this. Can you please try removing these lines of code and seeing if it works? It should. That's when the red line appeared and there was an error. If you've been waiting a super long time and it's still not working, then get back to me and I'll try and see if there is anything I can do when I get back on So I saw from your first screenshot that you got rid of the commented out parts under admob. I think it might just be taking a long time and you have to check over and over again before anything shows up. I think this could be part of your issue for iOS. I'm not sure exactly why admob was taking so long. This might be because they just didn't have an ad for me or it might be my region, because in certain regions they provide less ads. They straight up did not have one queued up for like 20 mins at least. It took a really, really long time for Admob to provide me with an ad. Let me address this with you I tested admob banners and interstitials on xcode and it worked, but there is one thing I noticed. I do think you can make it work at this point though. I want to check on this more and bring this up to the dev team on Monday. ![]() ![]() tAdUnitId("ca-app-pub-3940256099942544/6300978111") Īdditionally, if you want to handle Ad events, do as follows:- mAdView.Okay guys, so I did some major checking on this and there is definitely something a little fishy. Test Ads work by providing test adunit published by google. mAdView = findViewById(R.id.adView) ĪdRequest adRequest = new AdRequest.Builder().build() This needs to be done only once and thus the right place is either your first activity or at application's onCreate callback.įind the AdView in the activity onCreate where you have included AdView in the layout. MobileAds.initialize(this, "YOUR_ADMOB_APP_ID") in onCreate of your first Activity. Once you have fixed above problems, do the following:. Put the correct "ad unit" against yourĪdView as below. You can create in ADMOB dashboard by clicking on Ad Unit tab Remember you have to provide Ad unit not your publisherID, which The second problem is, where you have declared AdView in your layout. You can find ADMOB_APP_ID by on ADMOB dashboard, click on the applicationĪnd check "App Settings". The section should contain the ADMOB_APP_ID instead of your I see there are two problems in your code based on what you posted:. This worked in my code, Hope it will help you too. In your java code put these lines in onCreate method // Load addvertismentĪdView adView = (AdView) findViewById(R.id.adView) ĪdRequest adRequest = new AdRequest.Builder().addTestDevice("FF9CD441FA62FD456D7D571B91DD11DD").build() ![]() Put your admob view inside RelativeLayout and try to use android:alignparentBottom:true On Create Code: AdView adView = (AdView)this.findViewById(R.id.adView) īe sure that your Admob layout is displaying in xml view. My application configuration and code are below. Is there something that needs to be enabled in my account, the main.xml, AndroidManifest.xml, or in the loading of the application? I recently finished my app, and I tried to put in admob banners. However, I am not seeing the Admob ads being displayed on the Android screen in the emulator and my Android test phones as well.Īs stated before, I can see the requests coming into my AdMob account. I am trying to implement Admob in Android and I am seeing requests coming into AdMob. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |