Remove admob ads on purchase

Is it possible to remove Google Admob ads when a users gets a subscription using In-App billing and when it expires the ads re-show? Thanks in advance :slight_smile:

When user purchase app, set his Google account to a variable and when app initialise if the login ID is in that variable then set admob banner ads visible to false

1 Like

could you please send blocks?

This should help:


thank you :smiley:

Mark as the solution if it works.

1 Like

how to use the call block?

Just instead of the block put blocks that are neccassery to do that. For example call removeAds: set ad.visible to false.

you need to create a procedure when you create a procedure that under procedure it will show the “call block” with your procedure name


when you name your procedure you have to place blocks for what you want that particular procedure to do in your case you can place set AdMob visible to false under procedure and it will execute when you call it.

If it works please mark my answer as the solution. It is for the people.

it gives me this error
Attempt to invoke virtual method ‘boolean, java.lang.String)’ on a null object reference

You didn’t insert a MerchantID and the required stuff. Take a look at @Taifun’s tutorial on how to set it up.

ok, I marked your comment as solution. But how do I find the subscription id, product id and license key? I got my merchant ID.

Subscription/Product ID:
1.Go to the settings tab.

2. Go to Pricing templates
3.Select your Product or create a new one.
4.There it is!
License Key:
1.Select your app
2.Go to Development tools => Services & APIs2_2
3.That loooooooooong text is your license key for that app!

did it work?

i’m still waiting for google to to rollout the app update :roll_eyes:

Lol. I know, it takes some time. Will you send me the link when the app is published?

sure I will

Is the app live yet?

nope… still not