Skip to main content

Admob Setup

We are using Admob ads so here how you can setup it on the app :

1- You need to have Firebase and Admob Account using the same Google account.

2- Assuming you create the firebase and AdMob account click the link to create new Firebase Project link.

3- Now follow these steps :

  • Create new Firebase Project.

    newfirebase

  • Set the project name (something related to app title).

    firebase

  • Select default account if you have multiple and click "create project".

    firebase


  • After creating the project page will appear like the one bellow click android icon.

    firebase


  • Add your package name to the field make sure is correct or else it's not gonna work the others are optional.

    firebase


  • When you are done click "Register App".

    firebase


  • The download button should appear click it.

    firebase


  • Go to this path : music_offline_template/android/app and paste google-services.json file

    googleservices


4- After we have done with the firebase part lets move to Admob.

  • Now we need to create Admob app, first, make sure the account you used with firebase is the one you using.

    admob


  • Select Android

    admob


  • Make sure Android is selected and give your app name.

    admob


  • Now we created Admob App copy the id we will need it later and click next.

    admob


  • Select "Banner".

    admob


  • Give the unit name and make sure the boxes checked like showing in the image and click "CREATE AD UNIT".

    admob


  • Create another Ad Unit this time is interstitial Ad.

    admob


    admob


  • Now we have done creating AdMob app, copy the App Id and Unit Id and click "Done" (note your app may take while to activate the ads).

    admob


  • In customize the App section where is bannerAdId and interstitialAdId is where your replace them with your Units Ids.

  • Go to /android/app/src/main/AndroidManifest.xml and replace the highlighted id with admob app id we got before from Admob dashboard.

    AndroidManifest


  • Note thats the Ads may take while to appear on the app.