Unable to set user's admobReleaseUnitId. Adapter use HARDCODED value of AdMob ad unit id.
See original GitHub issueadapterWrapper = new AdmobAdapterWrapper(context, admobReleaseUnitId);
admobReleaseUnitId - never used in code, because in method init() Collection(String) admobReleaseUnitIds never used:
private void init(Context context, Collection<String> admobReleaseUnitIds, String[] testDevicesId, EnumSet<EAdType> adTypesToShow){
setNoOfDataBetweenAds(DEFAULT_NO_OF_DATA_BETWEEN_ADS);
setLimitOfAds(DEFAULT_LIMIT_OF_ADS);
setContentAdsLayoutContext(ContentAdLayoutContext.getDefault());
setInstallAdsLayoutContext(InstallAppAdLayoutContext.getDefault());
mContext = context;
adFetcher = new AdmobFetcher();
if(testDevicesId!=null)
for (String testId: testDevicesId)
adFetcher.addTestDeviceId(testId);
adFetcher.setAdTypeToFetch(adTypesToShow == null || adTypesToShow.isEmpty()
? EnumSet.allOf(EAdType.class): adTypesToShow);
adFetcher.addListener(this);
// Start prefetching ads
adFetcher.prefetchAds(context.getApplicationContext());
}
Instead of that adapter use hardcoded values of test_admob_unit_id
<resources>
<string name="app_name">admobadapter</string>
<string name="test_admob_unit_id">ca-app-pub-3940256099942544/3986624511</string>
<string name="test_admob_express_unit_id">ca-app-pub-3940256099942544/1072772517</string>
</resources>
Please, add capability to set users AdMob unit ID.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Find your app IDs & ad unit IDs - Google AdMob Help
The app ID is used to identify your apps. An ad unit ID is a unique ID number assigned to each of your...
Read more >Get started with the AdMob API - Google Developers
Follow the steps to configure a Google API Console project. · Open the Credentials page in the API Console. · Click CREATE CREDENTIALS...
Read more >Admob ads not loading - Failed to load ad: 0 - Stack Overflow
Your ad id is newly created so it will take some time to fetch ads from google servers. You can verify this by...
Read more >AdMob Integration - Prebid Documentation
Otherwise, it will fail with “no ad” immediately and the next ad source will instantiate the same adapter but for another set of...
Read more >Adding AdMob ads to a Flutter app - Google Codelabs
1. Introduction · 2. Set up your Flutter development environment · 3. Set up the AdMob app and ad units · 4. Add...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kot331107 ofc! 😃
@kot331107 No problems. I also think this library would benefit from using a builder pattern instead of this growing constructor. I might have a look at that as well if I get some time over 😃 Thanks for a great lib.