Ads are not getting removed after someone clicks on them

view story

http://stackoverflow.com – I am working on a code where someone clicks on a ad and comes back to the app the ad should disappear. But the ads are still showing up . My app is resuming as i am not getting the toast message again and again. But the ads are still showing up and not getting removed. i have added android:launchMode="singleInstance" int the manifest and android:alwaysRetainTaskState="true" in the activity section. This is my code for the .java file of the mainactivity : public class MainActivity extends Activity implements AdListener{ public static int count=0,dispad=0; public static Linea (HowTos)