admob
Embedding ads within Recyclerview
In your adapter, you first need to override getItemViewType, for example: @Override public int getItemViewType(int position) { if (position % 5 == 0) return AD_TYPE; return CONTENT_TYPE; } Then in onCreateViewHolder, inflate a different view according to the type. Something like this: @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) { View v = null; if … Read more
AdMob crashes with [GADObjectPrivate changeState:]: unrecognized selector
You need to add -ObjC to the Other Linker Flags of your application target’s build setting: Click the blue top-level project icon in XCode Choose your target and go to Build Settings Under Other Linker Flags add -ObjC for both Release and Debug Source: https://developers.google.com/mobile-ads-sdk/docs/admob/mediation#ios-linker Also be sure to do a clean and rebuild
java.util.ConcurrentModificationException in activity onCreate
In our case, we are only seeing the crash with com.google.firebase:firebase-analytics:17.2.2 reverting to 17.2.1 has fixed the problem This happens too if you are using firebase-core:17.2.2, because firebase-analytics is the same library rebranded. Take into account that as per official docs, current usage of firebase-core is deprecated -> https://firebase.google.com/support/release-notes/android#latest_sdk_versions
Ad Size and Ad unit id must be set before loadAd is called
I found solution in the github example, that is: instead of xmlns:ads=”http://schemas.android.com/apk/lib/com.google.ads” delete the xmlns:ads*** tag and add xmlns:ads=”http://schemas.android.com/apk/res-auto” tag to your LinearLayout tag as follow: <?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:ads=”http://schemas.android.com/apk/res-auto” android:orientation=”vertical” android:layout_width=”match_parent” android:layout_height=”match_parent”> <TextView android:layout_width=”match_parent” android:layout_height=”wrap_content” android:text=”@string/hello”/> <com.google.android.gms.ads.AdView android:id=”@+id/adView” android:layout_width=”match_parent” android:layout_height=”wrap_content” ads:adSize=”BANNER” ads:adUnitId=”INSERT_YOUR_AD_UNIT_ID_HERE”/> </LinearLayout> That’s it 🙂 github link for this xml
Admob ads not loading – Failed to load ad: 0
There is no fault in your code. It’s all good. You just need to wait a little. Your ad id is newly created so it will take some time to fetch ads from google servers. You can verify this by adding banner/interstitial ad id you creating for earlier applications and you’ll see that they work. … Read more
Should I use different AdMob Ad Units ID in different Activities?
You can use one Ad Unit ID for all banner ads within your app and a different Ad Unit ID for all interstitial ads within the same app. Thus, if your app contains only banner ads, it can have only one Ad Unit ID. If your app contains banner and interstitial ads, it can have … Read more
duplicate symbols for architecture i386 clang
Another reason this error often happens is accidentally importing the .m file instead of the .h.
Admob shows Test ads but not real ads
When apps are newly registered with AdMob, it takes some time and a few ads requests to allow inventory to build. Because of this, you may not see live impressions immediately. Once your app starts making more requests, you should see more consistent results. Please note that test ads operate through the same channels as … Read more
What is app-ads.txt and how do I implement it in AdMob?
First of all, you have to know – What is app-ads.txt? App-ads.txt is a text file app developers upload to their developer website, which lists the ad sources authorized to sell that developer’s inventory. Just like on the web, the IAB created a system which allows buyers to know who is authorized to buy and … Read more