I have a problem that I can't figure out.
I have an application that has two modes in it. Normal Mode and Kid Mode.
The Kid Mode is mainly for my grandkids where I remove the ads from Ad Mob. I don't want them accidently opening ads and having Google think I was doing it to increase my revenue and disable my account.
I have a menu option "Switch Mode" that allows the user to toggle between the two modes.
The menu option works fine on my Motorola Droid 4.
However, on my Nexus 7, If I go into Kid Mode first and then switch to Normal Mode, it works fine. But if I go into Normal Mode first and then switch to Kid Mode, the ad still shows on the screen.
I have tried a dozen different variations but nothing seems to make a difference. I am hoping someone could give me some direction.
I could always create another class but was hoping to keep from duplicating the code since only the ad is what gets changed.
I've tried adding both AdView1.RemoveView, AdView1.Enabled = false, and AdView1.Visible = false but none of them work on the Nexus 7.
I have an application that has two modes in it. Normal Mode and Kid Mode.
The Kid Mode is mainly for my grandkids where I remove the ads from Ad Mob. I don't want them accidently opening ads and having Google think I was doing it to increase my revenue and disable my account.
I have a menu option "Switch Mode" that allows the user to toggle between the two modes.
The menu option works fine on my Motorola Droid 4.
However, on my Nexus 7, If I go into Kid Mode first and then switch to Normal Mode, it works fine. But if I go into Normal Mode first and then switch to Kid Mode, the ad still shows on the screen.
I have tried a dozen different variations but nothing seems to make a difference. I am hoping someone could give me some direction.
I could always create another class but was hoping to keep from duplicating the code since only the ad is what gets changed.
B4X:
Sub Activity_Resume
If KidMode = False Then
AdView1.Initialize("Ad", "000000000000000")
Activity.AddView(AdView1, (0 0, 320dip, 50dip)
AdView1.LoadAd
End If
End Sub
B4X:
Sub HomeMenu_Click
this_page = Sender
If this_page = "Switch Mode" Then
If KidMode = False Then
KidMode = True
Else
KidMode = False
End If
End If
Activity_Resume
End Sub
I've tried adding both AdView1.RemoveView, AdView1.Enabled = false, and AdView1.Visible = false but none of them work on the Nexus 7.
Last edited: