Flutter - Using multiple Test Id for Admob Banner - flutter

I wanted to add some Admob Banner in my Flutter app (using the offical Admob package https://pub.dev/packages/google_mobile_ads)
Flutter Admob guide only provide 1 Test ID for iOS and another for Android, what can I do if I need multiple Test ID in my app?

You can use the same Test ID multiple times. But make sure to replace it with a real one before launching. Real ones cannot be called multiple times (unless if you dispose them before using them somewhere else) so create new ones accordingly

Finally found the solution. I have summarised the steps below for anyone who wants to know how to use multiple IDs in Flutter (this might be common since Flutter users is likely to place Ads in ListView). I have also added some reading reference below.
In summary:
Use your own Ads Id (not Test Id)
Run an Ads in your actual Device to obtain the Test Device ID. This is automatically print out when the ads is called. Find the text similar to the example shown below:
RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("The code you want to copy"))
to get test ads on this device."
Use the code below to initialised Admob to provide Test Ads. Call the code before you initialised Admob.
You will observe actual Ads but with a "Test Ads" text on top.
Code to initialised Test Ads for Flutter:
//"The code you want to copy" is the code that you extract from your log based on earlier steps
List<String> testDeviceIds = "The code you want to copy";
RequestConfiguration configuration = RequestConfiguration(
testDeviceIds: testDeviceIds);
MobileAds.instance.updateRequestConfiguration(configuration);
Reading material for reference:
Reference to Admob Test Ads for native Android if you are interested - link. They should add documentation for Flutter.
Reference to the code from another post which provide the code by answering a different question. Here is the link.

Related

I am trying to cast videos from my app to chrome-cast devices

Hi I am trying to cast videos from my flutter app to chromecast devices using this plugin called flutter_video_cast from pub.dev
But the issue is while I am trying to setup these plugin for android. The instruction given by the developers in not clear due to these I am able to use it in my app.
The section which I need clarification is this part
I am not able to get what it meant by initialize cast context by extending flutter fragement activity.
Any sort of answers will be helpful for me.

show ads in flutter website(flutter web app)

How to implement AdSense or any other to show ads on the flutter website (flutter web app).
Which are the ad provider options like Adsense for a flutter web app.
Currently if you try, your application will be submitted for review, and then you will inaccurately obtain a "Valuable Inventory: No content" flag/violation. The problem is noticed though, but unfortunately it will be a good amount of time before it gets prioritized over the mobile ad framework.
https://github.com/flutter/flutter/issues/40376
I don't think flutter is in a mood to encourage adds on flutter web. Google uses crawlers to search the content on websites which will not work in case of flutter that well event though you try to inject adds through js code using plugin and this made me scrape my whole UI project and start it over again on angular or react.
Take a look at this new package I just saw has been released. Still in the infancy stages as it says but it's a start at least.
https://pub.dev/packages/admanager_web
Example of implementation:
AdBlock(
size: AdBlockSize.largeRectangle,
adUnitId: "/6355419/Travel/Europe",
)

Where should I put FCM configuration in flutter app exactly?

I'm using firebase_messaging plugin in my flutter app to handle app notifications (given from a Laravel server). So far, I've successfuly installed the plugin in my project. Tested it on a page, it works.
But in the doc's example page, it's only demonstrate the usage of a single page. In reality, most of the apps has or may have many pages and each page has it's own notification channels, so does my app.
So.. Where is the exact location to put it's configuration? Should I configure it one each page, or can I just put it on main.dart and subscribe every channel from that page?
I don't think the first option is a best practice. Since I'm trying to follow DRY principle and avoid code-duplication to make it easier to maintain the app in the future. Any clue?

Alternative to admob for flutter

I am a new flutter developer.
I have an app on the play store using flutter.
When setting up admob inside the app, I placed the code inside the main.dart file.
Inside the app a user will navigate through multiple screen (roughly 10+ screens) hourly.
I didn't realize the way the admob code was setup, that a new ad was loading and showing every-time a user switched pages.
With over 50 users, some doing this up to 10 times a day, Google decided that I had broke terms of agreement and disabled my admob account.
I filed a dispute but was denied the ability to reactivate my admob account.
I am trying to figure out what my options are for monetizing my app.
I assume 1 option is to write native code and use something other than admob. Is there any other option for monetizing an app with flutter outside of admob?
SEARCH THESE PLUGINS IN PUB DEV..THEY ARE ALTERNATIVES OF ADOMB FOR FLUTTFR
facebook audience network
ironsrc.com
adcolony
admost flutter plugin
sanjagh
nend plugin
flutter pollfish
You can use admob config as usual. You only need to add https://pub.dev/packages/admob_flutter as a dependency and handle configs for iOS and android separately.

Does AdMob uses IDFA?

I am trying to submit an update of my app but it shows me some questions and I don't know what to check. I am using AdMob in my app just showing banners. I saw this post Does this app use the Advertising Identifier (IDFA)? - AdMob 6.8.0 and they say that AdMob does use IDFA, but
my question is: Do I need to add some extra code to my project? and
What should I check?
im always submitting the apps with chcked box, it's better to do even if you know it has IDFA.. so your on the good side.. otherwize you need to upload new build if its going to be rejected!
You do not need to add code to your project.
You should check the "serve ads within the app"