I implemented one interface in that it has to implement requestAd
on success and failure, onLeaveApplication
, onPresentScreen
, onReceiveAd
. I also extended the AdwhirlLayout class. I implemented only two methods in Adaptor.java
class requestAd
on success and failure only by these lines
public void requestAdSuccess() {
// TODO Auto-generated method stub
adWhirlLayout.adWhirlManager.resetRollover();
adWhirlLayout.nextView = adView;
adWhirlLayout.handler.post(adWhirlLayout.viewRunnable);
adWhirlLayout.rotateThreadedDelayed();
}
public void requestAdFail() {
// TODO Auto-generated method stub
adView.setAdListener(null);
adWhirlLayout.rollover();
}
public void onLeaveApplication(Ad arg0) {
// TODO Auto-generated method stub
}
public void onPresentScreen(Ad arg0) {
// TODO Auto-generated method stub
}
public void onReceiveAd(Ad arg0) {
// TODO Auto-generated method stub
}
I refresh my ad every 15 seconds. I wrote this based on GoogleAdAdaptor.java
code in adwhirl sample. What else do I have to add to the code in onLeaveApplication()
?