I wish to remove the ad if they are clicked once.
I implemented the following code.
I also added android:launchMode="singleInstance"
in the manifest and android:alwaysRetainTaskState="true"
in the activity section of the manifest.
But when i click on the ad and return to the app the ad is still showing . My code is as follows.
public class MainActivity extends Activity implements AdListener{
adView = (AdView)findViewById(R.id.ad);
adView.loadAd(new AdRequest());
// my code
@Override
public void onDismissScreen(Ad arg0) {
if (adView != null) {
adView.destroy();
}
// TODO Auto-generated method stub
}
@Override
public void onFailedToReceiveAd(Ad arg0, ErrorCode arg1) {
// TODO Auto-generated method stub
}
@Override
public void onLeaveApplication(Ad arg0) {
// TODO Auto-generated method stub
}
@Override
public void onPresentScreen(Ad arg0) {
// TODO Auto-generated method stub
}
@Override
public void onReceiveAd(Ad arg0) {
// TODO Auto-generated method stub
}
}