Reputation: 177
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
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