Liana Rahmadani
Liana Rahmadani

Reputation: 177

how to make in-app purchase remove ads

I have Android game project and I'm using ad-mob for ads. But, how to make if someone wants to remove ads must pay first.

Can you give me the tutorial, as I'm a newbie in Android and Java

Upvotes: 15

Views: 17224

Answers (1)

arslan haktic
arslan haktic

Reputation: 4538

You can simply make a button to make in-app purchase in your application. And, once the user presses the button, starts the in-app process, and removes the ads.

Make a flag. It can be in your shared preferences and can be marked true on successful in-app purchase.

Once the purchase is done on all places where the ad is displayed, check the flag, and if it's false then don't display ad.

Follow this link: Integrating Google Play In-app Billing into an Android Application

Upvotes: 16

Related Questions