@React-Native-firebase/admob does not work

Asked

Viewed 74 times

0

I am trying to insert ads into my code in React Native via the @React-Native-firebase/admob library. I took the whole step by step of the Admob platform to create my account and create my first project there. I also set firebase to link a firebase project to the project created in Admob.

However, when I try to compile the code with a banner ad, I get the following error:

[admob/error-code-no-fill] The ad request was successful, but no ad was returned due to lack of ad inventory.]

Obs.: I’m trying to insert a banner with the Testids, and still get this error.

Library versions in my package.json:

"@react-native-firebase/admob": "^11.2.0",
"@react-native-firebase/app": "^11.2.0",

Part of my ad code:

import { BannerAd, BannerAdSize, TestIds } from '@react-native-firebase/admob'

...

const testBannerId = TestIds.BANNER

...

<BannerAd
  unitId={testBannerId}
  size={BannerAdSize.BANNER}
  onAdClosed={() => console.log('closed')}
  onAdFailedToLoad={(error: any) => console.log(error)}
  onAdLeftApplication={() => console.log('Ad left application')}
  onAdLoaded={() => console.log('Ad loaded')}
  onAdOpened={() => console.log('Ad opened')}
/>

Does anyone have any idea what’s going on? Thank you very much!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.