All Admob needs is an XML code?

Asked

Viewed 53 times

2

inserir a descrição da imagem aqui

Admob only needs this code or needs some created class?

  • Paiva, try not to insert image of your code, but the code itself here. This makes it much easier!

  • Thanks for the tip

1 answer

4


NAY. You need to make a request to retrieve the ad, which is only possible through a class. See an example:

// fazendo uma requisição 
AdRequest adRequest = new AdRequest.Builder().build();

// adicionando a requisição no AdView.
 adView.loadAd(adRequest);

See more details in the Adrequest documentation.

  • But first I need to link adview with the XML I created right?

  • @Paiva yes, you have to instantiate your xml with the java class.

Browser other questions tagged

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