tags:

views:

152

answers:

1

I have an app with Admob ads on it but I find that when I use it the ad almost never refreshes because I don't change activities, instead I just update a text view when buttons are pressed. I have tried searching this on Google but keep comming up short.

I would like to tell the app to refresh the add occasionally, such as after two button clicks or something like that. Does anyone know how to do this and potentially have some sample code for it?

+1  A: 

It's right there in the AdMob API documentation that comes in the zip file along with the AdMob jar that you downloaded:

AddView.requestFreshAd()

Also, you can simply set a refresh interval with the refreshInterval attribute on the AdView element in your layout XML file. Or you can set the refreshInterval for the ads in your app via your account settings on the AdMob website.

I'd give you a link to the documentation, but I don't think it's on their site anywhere. It's all in the zip file you downloaded when you got the AdMob jar file to include in your app.

mbaird