Does Admob only need an XML code?

2

Does Admob only need this code or does it need some created class?

    
asked by anonymous 22.03.2017 / 16:20

1 answer

3

NO. You need to make a request to retrieve the ad, which is only possible through a class. Here's an example:

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

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

See more AdRequest documentation .

    
22.03.2017 / 16:26