How and where do I implement the code to set my test device ID for Admob in Flutter apart from setting it in my ADMOB UI? This line "Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("myTestDeviceId"))" keeps popping
Add
RequestConfiguration configuration =
RequestConfiguration(testDeviceIds: ["ID HERE"]);
And
MobileAds.instance.updateRequestConfiguration(configuration)
To your main function after mobileads.instance.initialize();
Next to the message you mentioned would be your device id ..
No need to add it in the admob setting after this
And then use actual ad units afterwards
Related
Initially the person before me set up a screen observer so that whenever the page changes, setCurrentScreen is triggered to send a event and log the screen. Because we use a bunch of open containers to animate page opening, the screen observer doesnt get triggered. So I went through the app and added some setCurrentScreen for those that the screenObserver missed, and while there I also added some logEvents to see if people are using specific parts of the app.
The way I set enabled debug view was in xcode, going to Product -> Scheme -> Edit Scheme and adding -FIRAnalyticsDebugEnabled and -FIRDebugEnabled Edit scheme
After ticking both of the above (or just one or the other), only these events are being triggered then the app stops sending events. Completely. What am I missing? output
I cannot find another issue about this. I am using the same package name in the app and firebase, otherwise I would have no output. All other issues are talking about no output at all. I have tried to do this on simulator and on actual iPhone and they both yield the same result. I have also set up a android emulator and have an actual phone. Tried it on both and same result. The above screenshot is from iPhone as I am on Mac and more comfortable working on a iPhone.
i have set IS_ANALYTICS_ENABLED to true in the .plist file and this did not work
Once the AdMob banner is displayed, it blinks the screen knowing that there is no error reporting in the console!
The screen viewing the ad includes a spinner that runs until some data are fetched from an API, so I kept the spinner loading until the Ad is present to avoid blinking, but the screen still blinks when Ad is shown.
This is a sample from my code:
this.admobFree.banner.config(ConfigData.bannerAds.config);
// autoShow = true in config.
this.admobFree.banner.prepare().then(()=>{
// Boolean variable that is assigned to the *ngIf directive to keep the spinner until the
// banner is loaded.
// <ion-spinner name="crescent" *ngIf="!isDataLoaded&&!(isBannerLoaded)"></ion-spinner>
isBannerLoaded=true;
});
What is causing the screen blink when a banner is viewed? And how to solve this?!
(ionic 4)
It seems that it is a fault in the ionic AdMob plugin where this issue is reported on the ionic forum without proposed solutions!
https://forum.ionicframework.com/t/admob-screen-flash-on-load/25526
I had solved this by waiting for the AdMob banner to be shown and then display my actual view where this is controlled by using the *ngIf directive and a Boolean variable like this:
isContentVisible: boolean=false;
....
this.admobFree.banner.show().then(()=>{
this.isContentVisible=true;
});
This will decrease the blink by 95%, but it may take some seconds to display if the internet connection is weak!
By the way the blink is slight, and will not be a clearly noticed issue, but to be professional it must be solved!
Hope the the ionic AdMob developers will solve that!
I am currently editing my code as following:
Admob ad;
ad.initAdmob("admob banner id", "admob interstitial id");
My question is that I don't know the difference between admob banner id and admob interstitial id,(by the way, my English is not very good)
When you click the create add section the first kind of add is banner and the second kind of add is interstellar.
Well this is not English too but you can see the places from these images.
After you create your adds you can look their id from your created adds
You can see add id from here, while you are creating your add give them a name inculude their type so you can find it later on here.
Initialize Admob Unity Plugin
Admob.Instance().initAdmob("admob banner id", "admob interstitial id");
Admob id with format ca-app-pub-279xxxxxxxx/xxxxxxxx
Required two id one for banner and another for interstitial Ads.
Register your app in the AdMob UI and create your own ad unit IDs for banner and interstitial.
My CodenameOne app works perfectly when using the android.googleAdUnitId or ios.googleAdUnitId build hints in order to show the Admob Ads banner at the bottom. However, I would like to give some coins/diamonds as rewards when users click on the bottom Ads banner. How can I do this? Is it possible for the main class to handle this by implementing the AdsListener interface like the https://github.com/chen-fishbein/admobfullscreen-codenameone supports (or at least the main class should implement a special interface which has the onAdLeftApplication() function only?)
Shai, Chen, anyone, do you have any advice?
There is no way to adjust the banner behavior, if you want to reward the user use full screen ads, there are quite a few full screen ads providers with a CodenameOne integration see these:
https://github.com/chen-fishbein/flurry-codenameone , https://github.com/chen-fishbein/startapp-codenameone , https://github.com/amiga/aerserv-codenameone
i try to run the downloaded code from admob, but that not shows adbanner in screen, even i uses publisher id in pice of code.
bannerView_.adUnitID = MY_BANNER_UNIT_ID;
Please answer.
Enable test ads to check whether the problem is with your code or with AdMob:
GADRequest.isTesting = YES;
Do what jnic suggests. Also, check if there is a message from AdMob in the console. There might be a message that says not showing ads is normal.