Furqan Hussain
Furqan Hussain

Reputation: 135

How To Make In-App Purchase To Remove Ads?

I have an application published on play store and it has Admob ads.Now I want to introduce in-app purchase to remove ads.This is the first time I am doing in-app purchase so I don't know much about it.

I have a button which says "Remove Ads" ,what I want is that when the user clicks on this button the app-purchase should open and user makes the payment.The Ads are disabled permanently.The ads should not appear even if the user updates the app. Also tell me how can I set my price to remove the ads.

Tell me this from scratch.

I have my licence key for my app from google play console.

Upvotes: 3

Views: 4790

Answers (1)

user8421421
user8421421

Reputation:

Just use a flag, if the user did an in app purchase set the flag true, otherwise false. Once the purchase done on all places where the add display's check the flag, if its false then don't display add. The flag itself can for example be stored using SharedPreferences (https://developer.android.com/training/data-storage/shared-preferences.html)

In app purchases and pricing are described here: https://developer.android.com/google/play/billing/billing_admin.html

Upvotes: 1

Related Questions