react-native-admob icon indicating copy to clipboard operation
react-native-admob copied to clipboard

Admob shows Test ads but not real ads

Open gaaragots opened this issue 8 years ago • 8 comments

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)} />

gaaragots avatar Dec 25 '17 14:12 gaaragots

Where are you developing? Emulator or real device? The package always shows test ads on emulator.

marudy avatar Dec 30 '17 14:12 marudy

On real device

gaaragots avatar Dec 30 '17 14:12 gaaragots

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);

marudy avatar Dec 30 '17 14:12 marudy

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

gaaragots avatar Dec 30 '17 14:12 gaaragots

Any news on this?

m-brtn avatar Jan 07 '18 08:01 m-brtn

@ruslanchek I solved the problem by using an other dependency https://github.com/invertase/react-native-firebase

gaaragots avatar Jan 07 '18 12:01 gaaragots

@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 avatar Feb 27 '18 08:02 ayushkamadji

@ayushkamadji try this example https://github.com/invertase/react-native-firebase-starter

gaaragots avatar Mar 07 '18 21:03 gaaragots