Admob shows Test ads but not real ads
I'm using react-native-admob for showing android ads. The test ads are working fine but real ads are not shown.
I'm using react 16.0.0 react-native 0.50.0 and react-native-admob ^2.0.0-beta.4
<AdMobBanner
adSize="fullBanner"
adUnitID={BANNER}
onAdFailedToLoad={error => console.warn(error)}
/>
Where are you developing? Emulator or real device? The package always shows test ads on emulator.
On real device
How about setup? Have you created admob unit ID from admob site? And even more have you configured this ID in your code before requesting the ad?
In example for interstitial ad it's like that:
AdMobInterstitial.setAdUnitID(AD_UNIT_ID_STRING);
yes I did all this think, and to make sure that the problem is not from the code, I set AdUnitID in a native code (java), and it works
Any news on this?
@ruslanchek I solved the problem by using an other dependency https://github.com/invertase/react-native-firebase
@gaaragots I have this same problem. Logcat outputs
02-27 15:31:31.741 12221-12221/com.*** I/Ads: Starting ad request.
02-27 15:31:31.741 12221-12221/com.*** I/Ads: Use AdRequest.Builder.addTestDevice("***") to get test ads on this device.
02-27 15:31:31.771 12221-12570/com.*** W/Ads: Invoke Firebase method getInstance error.
02-27 15:31:31.771 12221-12570/com.*** W/Ads: The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
02-27 15:31:32.451 3795-12584/? W/Ads: Received error HTTP response code: 400
02-27 15:31:32.451 12221-12312/com.*** W/Ads: There was a problem getting an ad response. ErrorCode: 0
02-27 15:31:32.461 12221-12221/com.*** W/Ads: Failed to load ad: 0
Could you elaborate on your solution? Do you just install dep react-native-firebase? Thank you
@ayushkamadji try this example https://github.com/invertase/react-native-firebase-starter